mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-17 19:06:18 +02:00
closing tablet when taking snapshot
This commit is contained in:
parent
c76987c179
commit
7d84aae670
3 changed files with 12 additions and 2 deletions
|
@ -77,6 +77,10 @@ bool HMDScriptingInterface::shouldShowHandControllers() const {
|
||||||
return _showHandControllersCount > 0;
|
return _showHandControllersCount > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HMDScriptingInterface::closeTablet() {
|
||||||
|
_showTablet = false;
|
||||||
|
}
|
||||||
|
|
||||||
QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) {
|
QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) {
|
||||||
glm::vec3 hudIntersection;
|
glm::vec3 hudIntersection;
|
||||||
auto instance = DependencyManager::get<HMDScriptingInterface>();
|
auto instance = DependencyManager::get<HMDScriptingInterface>();
|
||||||
|
|
|
@ -72,6 +72,8 @@ public:
|
||||||
// rotate the overlay UI sphere so that it is centered about the the current HMD position and orientation
|
// 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 centerUI();
|
||||||
|
|
||||||
|
Q_INVOKABLE void closeTablet();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
bool shouldShowHandControllersChanged();
|
bool shouldShowHandControllersChanged();
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
(function() { // BEGIN LOCAL_SCOPE
|
(function() { // BEGIN LOCAL_SCOPE
|
||||||
|
|
||||||
var SNAPSHOT_DELAY = 500; // 500ms
|
var SNAPSHOT_DELAY = 500; // 500ms
|
||||||
|
var FINISH_SOUND_DELAY = 350;
|
||||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
var resetOverlays;
|
var resetOverlays;
|
||||||
var reticleVisible;
|
var reticleVisible;
|
||||||
|
@ -119,8 +120,11 @@ function onClicked() {
|
||||||
|
|
||||||
// take snapshot (with no notification)
|
// take snapshot (with no notification)
|
||||||
Script.setTimeout(function () {
|
Script.setTimeout(function () {
|
||||||
Window.takeSnapshot(false, true, 1.91);
|
HMD.closeTablet();
|
||||||
}, SNAPSHOT_DELAY);
|
Script.setTimeout(function () {
|
||||||
|
Window.takeSnapshot(false, true, 1.91);
|
||||||
|
}, SNAPSHOT_DELAY);
|
||||||
|
}, FINISH_SOUND_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isDomainOpen(id) {
|
function isDomainOpen(id) {
|
||||||
|
|
Loading…
Reference in a new issue