1
0
Fork 0

gui/dialogs/vr-options: Add mirror options

Add options to the vr-options dialog to allow the mirror to be toggled,
and the mirror mode to be changed (which reloads the compositor if
changed).
This commit is contained in:
James Hogan 2021-08-23 11:50:09 +01:00
parent 3aa8691963
commit ab3718eb28
No known key found for this signature in database
GPG key ID: 35CEE4862B1023F2
2 changed files with 54 additions and 0 deletions

View file

@ -82,6 +82,8 @@ particular list.
<property>/sim/rendering/dynamic-lighting/enabled</property>
<property>/sim/rendering/dynamic-lighting/max-pointlights</property>
<property>/sim/rendering/dynamic-lighting/max-spotlights</property>
<property>/sim/vr/mirror-enabled</property>
<property>/sim/vr/mirror-mode</property>
</compositor-reload-required>
<restart-required>

View file

@ -97,6 +97,58 @@
</text>
</group>
<group>
<layout>hbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
<checkbox>
<halign>left</halign>
<label>Desktop Mirror</label>
<property>/sim/vr/mirror-enabled</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
if (getprop("/sim/rendering/compositor-reload-required")) {
fgcommand("reload-compositor");
}
</script>
</binding>
</checkbox>
<empty><stretch>true</stretch></empty>
<combo>
<pref-width>250</pref-width>
<live>true</live>
<property>/sim/vr/mirror-mode</property>
<value>AUTOMATIC</value>
<value>NONE</value>
<value>LEFT</value>
<value>RIGHT</value>
<value>LEFT_RIGHT</value>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
if (getprop("/sim/rendering/compositor-reload-required")) {
fgcommand("reload-compositor");
}
</script>
</binding>
</combo>
<!-- gap -->
<text>
<label> </label>
</text>
</group>
<empty>
<stretch>true</stretch>
</empty>