mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:23:57 +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;
|
||||
}
|
||||
|
||||
void HMDScriptingInterface::closeTablet() {
|
||||
_showTablet = false;
|
||||
}
|
||||
|
||||
QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) {
|
||||
glm::vec3 hudIntersection;
|
||||
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
|
||||
Q_INVOKABLE void centerUI();
|
||||
|
||||
Q_INVOKABLE void closeTablet();
|
||||
|
||||
signals:
|
||||
bool shouldShowHandControllersChanged();
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue