closing tablet when taking snapshot

This commit is contained in:
Dante Ruiz 2017-01-12 17:29:38 +00:00
parent c76987c179
commit 7d84aae670
3 changed files with 12 additions and 2 deletions

View file

@ -77,6 +77,10 @@ bool HMDScriptingInterface::shouldShowHandControllers() const {
return _showHandControllersCount > 0;
}
void HMDScriptingInterface::closeTablet() {
_showTablet = false;
}
QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) {
glm::vec3 hudIntersection;
auto instance = DependencyManager::get<HMDScriptingInterface>();

View file

@ -72,6 +72,8 @@ public:
// rotate the overlay UI sphere so that it is centered about the the current HMD position and orientation
Q_INVOKABLE void centerUI();
Q_INVOKABLE void closeTablet();
signals:
bool shouldShowHandControllersChanged();

View file

@ -11,6 +11,7 @@
(function() { // BEGIN LOCAL_SCOPE
var SNAPSHOT_DELAY = 500; // 500ms
var FINISH_SOUND_DELAY = 350;
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var resetOverlays;
var reticleVisible;
@ -119,8 +120,11 @@ function onClicked() {
// take snapshot (with no notification)
Script.setTimeout(function () {
Window.takeSnapshot(false, true, 1.91);
}, SNAPSHOT_DELAY);
HMD.closeTablet();
Script.setTimeout(function () {
Window.takeSnapshot(false, true, 1.91);
}, SNAPSHOT_DELAY);
}, FINISH_SOUND_DELAY);
}
function isDomainOpen(id) {