Add a VR Options dialog
Add a VR Options dialog accessible from the View menu, allowing VR to be enabled and disabled, and the current VR state to be seen.
This commit is contained in:
parent
ba9465972b
commit
7ba3e5b975
5 changed files with 131 additions and 0 deletions
|
@ -1387,6 +1387,7 @@ menuEnable("joystick-info", size(props.globals.getNode("/input/joysticks", 1).ge
|
|||
menuEnable("rendering-buffers", getprop("/sim/rendering/rembrandt/enabled"));
|
||||
menuEnable("rembrandt-buffers-choice", getprop("/sim/rendering/rembrandt/enabled"));
|
||||
menuEnable("stereoscopic-options", !getprop("/sim/rendering/rembrandt/enabled"));
|
||||
menuEnable("vr-options", !getprop("/sim/rendering/rembrandt/enabled") and getprop("/sim/vr/built"));
|
||||
menuEnable("sound-config", getprop("/sim/sound/working"));
|
||||
menuEnable("swift_connection", getprop("/sim/swift/available"));
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<replay>Instant Replay</replay>
|
||||
<earthview>Earthview orbital rendering</earthview>
|
||||
<stereoscopic-options>Stereoscopic View Options</stereoscopic-options>
|
||||
<vr-options>VR Options</vr-options>
|
||||
<als-filter-effects>ALS Filter Effects</als-filter-effects>
|
||||
|
||||
<!-- Location menu -->
|
||||
|
|
|
@ -483,6 +483,10 @@
|
|||
<source>View Options</source>
|
||||
<target />
|
||||
</trans-unit>
|
||||
<trans-unit id="menu/vr-options:0" translate="yes" approved="no">
|
||||
<source>VR Options</source>
|
||||
<target />
|
||||
</trans-unit>
|
||||
<trans-unit id="menu/view-push:0" translate="yes" approved="no">
|
||||
<source>Push Pair View</source>
|
||||
<target />
|
||||
|
|
116
gui/dialogs/vr-options.xml
Normal file
116
gui/dialogs/vr-options.xml
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
|
||||
<name>vr-options</name>
|
||||
<modal>false</modal>
|
||||
<resizable>false</resizable>
|
||||
<layout>vbox</layout>
|
||||
<default-padding>3</default-padding>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<default-padding>1</default-padding>
|
||||
|
||||
<empty>
|
||||
<stretch>true</stretch>
|
||||
</empty>
|
||||
|
||||
<text>
|
||||
<label>VR Options</label>
|
||||
</text>
|
||||
|
||||
<empty>
|
||||
<stretch>true</stretch>
|
||||
</empty>
|
||||
|
||||
<button>
|
||||
<legend></legend>
|
||||
<key>Esc</key>
|
||||
<pref-width>16</pref-width>
|
||||
<pref-height>16</pref-height>
|
||||
<border>2</border>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<empty>
|
||||
<stretch>true</stretch>
|
||||
</empty>
|
||||
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
<padding>6</padding>
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>Enable VR</label>
|
||||
<property>/sim/vr/enabled</property>
|
||||
<live>false</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
</group>
|
||||
|
||||
<text>
|
||||
<halign>center</halign>
|
||||
<label>OpenXR Information</label>
|
||||
<enable><property>/sim/vr/present</property></enable>
|
||||
</text>
|
||||
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
<border>10</border>
|
||||
<halign>center</halign>
|
||||
<default-padding>2</default-padding>
|
||||
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>OpenXR Runtime: MMMMMMMMMMMMMMMMMMMMMMMM</label>
|
||||
<format>OpenXR Runtime: %s</format>
|
||||
<property>/sim/vr/openxr/runtime/name</property>
|
||||
<live>true</live>
|
||||
<enable><property>/sim/vr/present</property></enable>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>OpenXR System: MMMMMMMMMMMMMMMMMMMMMMMM</label>
|
||||
<format>OpenXR System: %s</format>
|
||||
<property>/sim/vr/openxr/system/name</property>
|
||||
<live>true</live>
|
||||
<enable><property>/sim/vr/present</property></enable>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>VR State: MMMMMMMMMMMMMMMMMMMMMMMM</label>
|
||||
<format>VR State: %s</format>
|
||||
<property>/sim/vr/state-string</property>
|
||||
<live>true</live>
|
||||
<enable><property>/sim/vr/present</property></enable>
|
||||
</text>
|
||||
</group>
|
||||
|
||||
<empty>
|
||||
<stretch>true</stretch>
|
||||
</empty>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<button>
|
||||
<legend>Close</legend>
|
||||
<default>true</default>
|
||||
<key>Esc</key>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
||||
</PropertyList>
|
|
@ -199,6 +199,15 @@
|
|||
<enabled>false</enabled>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<name>vr-options</name>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>vr-options</dialog-name>
|
||||
</binding>
|
||||
<enabled>false</enabled>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<enabled>
|
||||
<property>/sim/rendering/shaders/skydome</property>
|
||||
|
|
Loading…
Add table
Reference in a new issue