History

Added General Preference to control stylus vs finger usage

By default the finger is preferred over the stylus.

Anthony J. Thibault committed 9 years ago

Commit 4f03c061 parent 465a9e24 files · +20 −2Browse files

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

Unified · Split

interface/src/Application.cpp+6−0
@@ -549,6 +549,7 @@ const float DEFAULT_DESKTOP_TABLET_SCALE_PERCENT = 75.0f; · 548 unmodified lines
549const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = true;549const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = true;
550const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false;550const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false;
551const bool DEFAULT_TABLET_VISIBLE_TO_OTHERS = false;551const bool DEFAULT_TABLET_VISIBLE_TO_OTHERS = false;
552const bool DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS = true;
552 553
553Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bool runServer, QString runServerPathOption) :554Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bool runServer, QString runServerPathOption) :
554 QApplication(argc, argv),555 QApplication(argc, argv),
@@ -572,6 +573,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 17 unmodified lines
572 _desktopTabletBecomesToolbarSetting("desktopTabletBecomesToolbar", DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR),573 _desktopTabletBecomesToolbarSetting("desktopTabletBecomesToolbar", DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR),
573 _hmdTabletBecomesToolbarSetting("hmdTabletBecomesToolbar", DEFAULT_HMD_TABLET_BECOMES_TOOLBAR),574 _hmdTabletBecomesToolbarSetting("hmdTabletBecomesToolbar", DEFAULT_HMD_TABLET_BECOMES_TOOLBAR),
574 _tabletVisibleToOthersSetting("tabletVisibleToOthers", DEFAULT_TABLET_VISIBLE_TO_OTHERS),575 _tabletVisibleToOthersSetting("tabletVisibleToOthers", DEFAULT_TABLET_VISIBLE_TO_OTHERS),
576 _preferAvatarFingerOverStylusSetting("preferAvatarFingerOverStylus", DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS),
575 _constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),577 _constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),
576 _scaleMirror(1.0f),578 _scaleMirror(1.0f),
577 _rotateMirror(0.0f),579 _rotateMirror(0.0f),
@@ -2362,6 +2364,10 @@ void Application::setTabletVisibleToOthersSetting(bool value) { · 1784 unmodified lines
2362 updateSystemTabletMode();2364 updateSystemTabletMode();
2363}2365}
2364 2366
2367void Application::setPreferAvatarFingerOverStylus(bool value) {
2368 _preferAvatarFingerOverStylusSetting.set(value);
2369}
2370
2365void Application::setSettingConstrainToolbarPosition(bool setting) {2371void Application::setSettingConstrainToolbarPosition(bool setting) {
2366 _constrainToolbarPosition.set(setting);2372 _constrainToolbarPosition.set(setting);
2367 DependencyManager::get<OffscreenUi>()->setConstrainToolbarToCenterX(setting);2373 DependencyManager::get<OffscreenUi>()->setConstrainToolbarToCenterX(setting);