Warp/time-adjust GUI tweaks
- make t/T action press and hold, with some acceleration factor and clamping to a maximum rate. (Avoids confusing latching-mode of previous system( - show the local time of day while adjusting. Values are based on some experimentation, feedback welcome on the mailing list.
This commit is contained in:
parent
fd8a1dece8
commit
fddc972010
2 changed files with 38 additions and 22 deletions
|
@ -1282,10 +1282,9 @@ var basic_keys = {
|
|||
{ name: "Ctrl-C", desc: "toggle clickable panel hotspots" },
|
||||
{ name: "p", desc: "pause/continue sim" },
|
||||
{ name: "Ctrl-R", desc: "activate instant replay system" },
|
||||
{ name: "t/T", desc: "increase/decrease warp delta" },
|
||||
{ name: "t/T", desc: "adjust time of day forward/backward" },
|
||||
{ name: "v/V", desc: "cycle views (forward/backward)" },
|
||||
{ name: "Ctrl-V", desc: "select cockpit view" },
|
||||
{ name: "w/W", desc: "increase/decrease warp" },
|
||||
{ name: "x/X", desc: "zoom in/out" },
|
||||
{ name: "Ctrl-X", desc: "reset zoom to default" },
|
||||
{ name: "z/Z", desc: "increase/decrease visibility" },
|
||||
|
|
51
keyboard.xml
51
keyboard.xml
|
@ -769,12 +769,27 @@ top down before the key bindings are parsed.
|
|||
|
||||
<key n="84">
|
||||
<name>T</name>
|
||||
<desc>Decrease warp delta</desc>
|
||||
<desc>Warp time backwards</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/time/warp-delta</property>
|
||||
<step type="int">-30</step>
|
||||
<min type="int">-720</min>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>show-message</command>
|
||||
<id>warp-feedback</id>
|
||||
<label>Current time: %s</label>
|
||||
<property>/instrumentation/clock/local-short-string</property>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/time/warp-delta</property>
|
||||
<value type="int">0</value>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</key>
|
||||
|
||||
<key n="86">
|
||||
|
@ -786,6 +801,9 @@ top down before the key bindings are parsed.
|
|||
</binding>
|
||||
</key>
|
||||
|
||||
|
||||
<!-- disabling this method of adjusting warp following discussion on the
|
||||
developer list
|
||||
<key n="87">
|
||||
<name>W</name>
|
||||
<desc>Decrease warp</desc>
|
||||
|
@ -795,6 +813,7 @@ top down before the key bindings are parsed.
|
|||
<step type="int">-60</step>
|
||||
</binding>
|
||||
</key>
|
||||
-->
|
||||
|
||||
<key n="88">
|
||||
<name>X</name>
|
||||
|
@ -1013,29 +1032,26 @@ top down before the key bindings are parsed.
|
|||
|
||||
<key n="116">
|
||||
<name>t</name>
|
||||
<desc>Increase warp delta</desc>
|
||||
<desc>Warp time forwards</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/time/warp-delta</property>
|
||||
<step type="int">30</step>
|
||||
<max type="int">720</max>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
(func(x) {
|
||||
settimer(func {
|
||||
x == t_id or return;
|
||||
gui.popupTip("resetting warp");
|
||||
setprop("/sim/time/warp-delta", 0);
|
||||
}, 1, 1)
|
||||
})(t_id += 1)
|
||||
</script>
|
||||
<command>show-message</command>
|
||||
<id>warp-feedback</id>
|
||||
<label>Current time: %s</label>
|
||||
<property>/instrumentation/clock/local-short-string</property>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>t_id += 1</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/time/warp-delta</property>
|
||||
<value type="int">0</value>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</key>
|
||||
|
||||
|
@ -1048,6 +1064,7 @@ top down before the key bindings are parsed.
|
|||
</binding>
|
||||
</key>
|
||||
|
||||
<!--
|
||||
<key n="119">
|
||||
<name>w</name>
|
||||
<desc>Increase warp</desc>
|
||||
|
@ -1056,7 +1073,7 @@ top down before the key bindings are parsed.
|
|||
<property>/sim/time/warp</property>
|
||||
<step type="int">60</step>
|
||||
</binding>
|
||||
</key>
|
||||
</key> -->
|
||||
|
||||
<key n="120">
|
||||
<name>x</name>
|
||||
|
|
Loading…
Reference in a new issue