From e40e34856ba78f84556022243285f4ae0fa14635 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 17 May 2019 13:28:59 -0700 Subject: [PATCH] Remove some extra menus from top bar; Only show VR button if headset connected --- .../hifi/simplifiedUI/topBar/SimplifiedTopBar.qml | 12 ++++++++++++ scripts/system/simplifiedUI/simplifiedUI.js | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml index a5a079b4dc..09873396fa 100644 --- a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml +++ b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml @@ -250,6 +250,7 @@ Rectangle { anchors.rightMargin: 14 width: 32 height: width + visible: false Image { id: displayModeImage @@ -306,6 +307,17 @@ Rectangle { } } } + + Component.onCompleted: { + // Don't show VR button unless they have a VR headset. + var displayPluginCount = Window.getDisplayPluginCount(); + for (var i = 0; i < displayPluginCount; i++) { + if (Window.isDisplayPluginHmd(i)) { + hmdButtonContainer.visible = true; + return; + } + } + } } } diff --git a/scripts/system/simplifiedUI/simplifiedUI.js b/scripts/system/simplifiedUI/simplifiedUI.js index c6181d2ad9..3917e69646 100644 --- a/scripts/system/simplifiedUI/simplifiedUI.js +++ b/scripts/system/simplifiedUI/simplifiedUI.js @@ -45,7 +45,8 @@ function runNewDefaultsTogether() { // Uncomment this out once the work is actually complete. // Until then, users are required to access some functionality from the top menu bar. //var MENU_NAMES = ["File", "Edit", "Display", "View", "Navigate", "Settings", "Developer", "Help"]; -var MENU_NAMES = ["File", "Edit", "View", "Navigate", "Help"]; +var MENU_NAMES = ["File", "Edit", "Display", "View", "Navigate", "Help", + "Settings > General...", "Settings > Controls...", "Settings > Audio...", "Settings > Graphics...", "Settings > Security..."]; var keepMenusSetting = Settings.getValue("simplifiedUI/keepMenus", false); function maybeRemoveDesktopMenu() { if (!keepMenusSetting) {