3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-04-18 08:58:59 +02:00

Merge pull request from zfox23/SUI/menuAndVRButton

Simplified UI V1: Remove some extra menus from top bar; Only show VR button if headset connected at startup
This commit is contained in:
Brad Hefta-Gaub 2019-05-17 14:41:04 -07:00 committed by GitHub
commit b5da7f00de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions
interface/resources/qml/hifi/simplifiedUI/topBar
scripts/system/simplifiedUI

View file

@ -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;
}
}
}
}
}

View file

@ -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) {