mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 15:17:42 +02:00
Merge pull request #15576 from zfox23/finishSettings
Simplified UI v1: Implement Performance settings and VR mode top bar switch
This commit is contained in:
commit
c0037c3445
2 changed files with 41 additions and 2 deletions
|
@ -13,6 +13,7 @@ import "../../simplifiedConstants" as SimplifiedConstants
|
||||||
import "../../simplifiedControls" as SimplifiedControls
|
import "../../simplifiedControls" as SimplifiedControls
|
||||||
import stylesUit 1.0 as HifiStylesUit
|
import stylesUit 1.0 as HifiStylesUit
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
import PerformanceEnums 1.0
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
property string avatarNametagMode: Settings.getValue("simplifiedNametag/avatarNametagMode", "on")
|
property string avatarNametagMode: Settings.getValue("simplifiedNametag/avatarNametagMode", "on")
|
||||||
|
@ -113,16 +114,28 @@ Flickable {
|
||||||
SimplifiedControls.RadioButton {
|
SimplifiedControls.RadioButton {
|
||||||
id: performanceLow
|
id: performanceLow
|
||||||
text: "Eco"
|
text: "Eco"
|
||||||
|
checked: Performance.getRefreshRateProfile() === RefreshRate.ECO
|
||||||
|
onClicked: {
|
||||||
|
Performance.setRefreshRateProfile(RefreshRate.ECO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SimplifiedControls.RadioButton {
|
SimplifiedControls.RadioButton {
|
||||||
id: performanceMedium
|
id: performanceMedium
|
||||||
text: "Interactive"
|
text: "Interactive"
|
||||||
|
checked: Performance.getRefreshRateProfile() === RefreshRate.INTERACTIVE
|
||||||
|
onClicked: {
|
||||||
|
Performance.setRefreshRateProfile(RefreshRate.INTERACTIVE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SimplifiedControls.RadioButton {
|
SimplifiedControls.RadioButton {
|
||||||
id: performanceHigh
|
id: performanceHigh
|
||||||
text: "Realtime"
|
text: "Realtime"
|
||||||
|
checked: Performance.getRefreshRateProfile() === RefreshRate.REALTIME
|
||||||
|
onClicked: {
|
||||||
|
Performance.setRefreshRateProfile(RefreshRate.REALTIME);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,8 +277,34 @@ Rectangle {
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Tablet.playSound(TabletEnums.ButtonClick);
|
Tablet.playSound(TabletEnums.ButtonClick);
|
||||||
// TODO: actually do this right and change the display plugin
|
var displayPluginCount = Window.getDisplayPluginCount();
|
||||||
HMD.active = !HMD.active;
|
if (HMD.active) {
|
||||||
|
// This next line seems backwards and shouldn't be necessary - the NOTIFY handler should
|
||||||
|
// result in `displayModeImage.source` changing automatically - but that's not working.
|
||||||
|
// This is working. So, I'm keeping it.
|
||||||
|
displayModeImage.source = "./images/vrMode.svg";
|
||||||
|
|
||||||
|
// Switch to desktop mode - selects first VR display plugin
|
||||||
|
for (var i = 0; i < displayPluginCount; i++) {
|
||||||
|
if (!Window.isDisplayPluginHmd(i)) {
|
||||||
|
Window.setActiveDisplayPlugin(i);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// This next line seems backwards and shouldn't be necessary - the NOTIFY handler should
|
||||||
|
// result in `displayModeImage.source` changing automatically - but that's not working.
|
||||||
|
// This is working. So, I'm keeping it.
|
||||||
|
displayModeImage.source = "./images/desktopMode.svg";
|
||||||
|
|
||||||
|
// Switch to VR mode - selects first HMD display plugin
|
||||||
|
for (var i = 0; i < displayPluginCount; i++) {
|
||||||
|
if (Window.isDisplayPluginHmd(i)) {
|
||||||
|
Window.setActiveDisplayPlugin(i);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue