Showing the changes to interface/src/Application.cpp (1 of 9 files). Show all
Unified · Split
| @@ -1059,10 +1059,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1058 unmodified lines | ||
| 1059 | 1059 | DependencyManager::get<AudioClient>()->toggleMute(); |
| 1060 | 1060 | } else if (action == controller::toInt(controller::Action::CYCLE_CAMERA)) { |
| 1061 | 1061 | cycleCamera(); |
| 1062 | − } else if (action == controller::toInt(controller::Action::UI_NAV_SELECT)) { | |
| 1063 | − if (!offscreenUi->navigationFocused()) { | |
| 1064 | − toggleMenuUnderReticle(); | |
| 1065 | − } | |
| 1066 | 1062 | } else if (action == controller::toInt(controller::Action::CONTEXT_MENU)) { |
| 1067 | 1063 | toggleTabletUI(); |
| 1068 | 1064 | } else if (action == controller::toInt(controller::Action::RETICLE_X)) { |
| @@ -1580,17 +1576,6 @@ QString Application::getUserAgent() { · 511 unmodified lines | ||
| 1580 | 1576 | return userAgent; |
| 1581 | 1577 | } |
| 1582 | 1578 | |
| 1583 | −void 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 | − | |
| 1594 | 1579 | uint64_t lastTabletUIToggle { 0 }; |
| 1595 | 1580 | const uint64_t toggleTabletUILockout { 500000 }; |
| 1596 | 1581 | void Application::toggleTabletUI() const { |
| @@ -2931,10 +2916,6 @@ void Application::keyPressEvent(QKeyEvent* event) { · 1334 unmodified lines | ||
| 2931 | 2916 | |
| 2932 | 2917 | |
| 2933 | 2918 | void Application::keyReleaseEvent(QKeyEvent* event) { |
| 2934 | − if (event->key() == Qt::Key_Alt && _altPressed && hasFocus()) { | |
| 2935 | − toggleMenuUnderReticle(); | |
| 2936 | − } | |
| 2937 | − | |
| 2938 | 2919 | _keysPressed.remove(event->key()); |
| 2939 | 2920 | |
| 2940 | 2921 | _controllerScriptingInterface->emitKeyReleaseEvent(event); // send events to any registered scripts |