History

Add option to disable triggering an away state when interface focus is lost.

Saracen committed 7 years ago

Commit 90e979b1 parent 6ccf16d6 files · +53 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all

Unified · Split

interface/src/Application.cpp+7−0
@@ -962,6 +962,7 @@ const bool DEFAULT_PREFER_STYLUS_OVER_LASER = false; · 961 unmodified lines
962962 const bool DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS = false;
963963 const QString DEFAULT_CURSOR_NAME = "DEFAULT";
964964 const bool DEFAULT_MINI_TABLET_ENABLED = true;
965+const bool DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED = true;
965966
966967 QSharedPointer<OffscreenUi> getOffscreenUI() {
967968 #if !defined(DISABLE_QML)
@@ -992,6 +993,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 24 unmodified lines
992993 _preferStylusOverLaserSetting("preferStylusOverLaser", DEFAULT_PREFER_STYLUS_OVER_LASER),
993994 _preferAvatarFingerOverStylusSetting("preferAvatarFingerOverStylus", DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS),
994995 _constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),
996+ _awayStateWhenFocusLostInVREnabled("awayStateWhenFocusLostInVREnabled", DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED),
995997 _preferredCursor("preferredCursor", DEFAULT_CURSOR_NAME),
996998 _miniTabletEnabledSetting("miniTabletEnabled", DEFAULT_MINI_TABLET_ENABLED),
997999 _scaleMirror(1.0f),
@@ -3562,6 +3564,11 @@ void Application::setSettingConstrainToolbarPosition(bool setting) { · 2564 unmodified lines
35623564 getOffscreenUI()->setConstrainToolbarToCenterX(setting);
35633565 }
35643566
3567+void Application::setAwayStateWhenFocusLostInVREnabled(bool enabled) {
3568+ _awayStateWhenFocusLostInVREnabled.set(enabled);
3569+ emit awayStateWhenFocusLostInVRChanged(enabled);
3570+}
3571+
35653572 void Application::setMiniTabletEnabled(bool enabled) {
35663573 _miniTabletEnabledSetting.set(enabled);
35673574 emit miniTabletEnabledChanged(enabled);