Added 'Time mode' dialogue to File menu.
Allows choice of real-time or simple-time modes.
This commit is contained in:
parent
fc42ef3fe4
commit
c81870cff1
4 changed files with 99 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
<file>File</file>
|
||||
<reset>Reset</reset>
|
||||
<flight-recorder-control>Flight Recorder Control</flight-recorder-control>
|
||||
<time-mode>Time Mode</time-mode>
|
||||
<load-tape>Load Flight Recorder Tape</load-tape>
|
||||
<save-tape>Save Flight Recorder Tape</save-tape>
|
||||
<snap-shot>Screenshot</snap-shot>
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
<halign>left</halign>
|
||||
<name>master</name>
|
||||
<property>/sim/multiplay/lag/master</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>master</object-name>
|
||||
|
|
88
gui/dialogs/time-mode.xml
Normal file
88
gui/dialogs/time-mode.xml
Normal file
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
|
||||
<name>time-mode</name>
|
||||
|
||||
<layout>vbox</layout>
|
||||
|
||||
<!-- titlebar -->
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<empty>
|
||||
<stretch>1</stretch>
|
||||
</empty>
|
||||
|
||||
<text>
|
||||
<label>Time Mode</label>
|
||||
</text>
|
||||
|
||||
<empty>
|
||||
<stretch>1</stretch>
|
||||
</empty>
|
||||
|
||||
<button>
|
||||
<pref-width>16</pref-width>
|
||||
<pref-height>16</pref-height>
|
||||
<legend></legend>
|
||||
<keynum>27</keynum>
|
||||
<border>2</border>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<radio>
|
||||
<halign>left</halign>
|
||||
<label>Real time</label>
|
||||
<property>/sim/multiplay/lag/master</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
var v = props.globals.getNode("/sim/multiplay/lag/master").getBoolValue();
|
||||
if (v) {
|
||||
props.globals.getNode("/sim/time/simple-time/enabled", 1).setBoolValue(0);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</radio>
|
||||
<button>
|
||||
<legend>Real time lag settings</legend>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>lag-adjust</dialog-name>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
<radio>
|
||||
<halign>left</halign>
|
||||
<label>Simple time</label>
|
||||
<property>/sim/time/simple-time/enabled</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
var v = props.globals.getNode("/sim/time/simple-time/enabled").getBoolValue();
|
||||
if (v) {
|
||||
props.globals.getNode("/sim/multiplay/lag/master", 1).setBoolValue(0);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</radio>
|
||||
</group>
|
||||
|
||||
</PropertyList>
|
|
@ -20,6 +20,14 @@
|
|||
</binding>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<name>time-mode</name>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>time-mode</dialog-name>
|
||||
</binding>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<name>snap-shot</name>
|
||||
<key>F3</key>
|
||||
|
|
Loading…
Add table
Reference in a new issue