History

clean up unused code and files

Dante Ruiz committed 9 years ago

Commit 2fc76d61 parent 67058469 files · +1 −431Browse files

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

Unified · Split

interface/src/Application.cpp+0−19
@@ -1059,10 +1059,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1058 unmodified lines
1059 DependencyManager::get<AudioClient>()->toggleMute();1059 DependencyManager::get<AudioClient>()->toggleMute();
1060 } else if (action == controller::toInt(controller::Action::CYCLE_CAMERA)) {1060 } else if (action == controller::toInt(controller::Action::CYCLE_CAMERA)) {
1061 cycleCamera();1061 cycleCamera();
1062 } else if (action == controller::toInt(controller::Action::UI_NAV_SELECT)) {
1063 if (!offscreenUi->navigationFocused()) {
1064 toggleMenuUnderReticle();
1065 }
1066 } else if (action == controller::toInt(controller::Action::CONTEXT_MENU)) {1062 } else if (action == controller::toInt(controller::Action::CONTEXT_MENU)) {
1067 toggleTabletUI();1063 toggleTabletUI();
1068 } else if (action == controller::toInt(controller::Action::RETICLE_X)) {1064 } else if (action == controller::toInt(controller::Action::RETICLE_X)) {
@@ -1580,17 +1576,6 @@ QString Application::getUserAgent() { · 511 unmodified lines
1580 return userAgent;1576 return userAgent;
1581}1577}
1582 1578
1583void Application::toggleMenuUnderReticle() const {
1584 // In HMD, if the menu is near the mouse but not under it, the reticle can be at a significantly
1585 // different depth. When you focus on the menu, the cursor can appear to your crossed eyes as both
1586 // on the menu and off.
1587 // Even in 2D, it is arguable whether the user would want the menu to be to the side.
1588 const float X_LEFT_SHIFT = 50.0;
1589 auto offscreenUi = DependencyManager::get<OffscreenUi>();
1590 auto reticlePosition = getApplicationCompositor().getReticlePosition();
1591 offscreenUi->toggleMenu(QPoint(reticlePosition.x - X_LEFT_SHIFT, reticlePosition.y));
1592}
1593
1594uint64_t lastTabletUIToggle { 0 };1579uint64_t lastTabletUIToggle { 0 };
1595const uint64_t toggleTabletUILockout { 500000 };1580const uint64_t toggleTabletUILockout { 500000 };
1596void Application::toggleTabletUI() const {1581void Application::toggleTabletUI() const {
@@ -2931,10 +2916,6 @@ void Application::keyPressEvent(QKeyEvent* event) { · 1334 unmodified lines
2931 2916
2932 2917
2933void Application::keyReleaseEvent(QKeyEvent* event) {2918void Application::keyReleaseEvent(QKeyEvent* event) {
2934 if (event->key() == Qt::Key_Alt && _altPressed && hasFocus()) {
2935 toggleMenuUnderReticle();
2936 }
2937
2938 _keysPressed.remove(event->key());2919 _keysPressed.remove(event->key());
2939 2920
2940 _controllerScriptingInterface->emitKeyReleaseEvent(event); // send events to any registered scripts2921 _controllerScriptingInterface->emitKeyReleaseEvent(event); // send events to any registered scripts