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: "Ctrl-C", desc: "toggle clickable panel hotspots" },
|
||||||
{ name: "p", desc: "pause/continue sim" },
|
{ name: "p", desc: "pause/continue sim" },
|
||||||
{ name: "Ctrl-R", desc: "activate instant replay system" },
|
{ 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: "v/V", desc: "cycle views (forward/backward)" },
|
||||||
{ name: "Ctrl-V", desc: "select cockpit view" },
|
{ name: "Ctrl-V", desc: "select cockpit view" },
|
||||||
{ name: "w/W", desc: "increase/decrease warp" },
|
|
||||||
{ name: "x/X", desc: "zoom in/out" },
|
{ name: "x/X", desc: "zoom in/out" },
|
||||||
{ name: "Ctrl-X", desc: "reset zoom to default" },
|
{ name: "Ctrl-X", desc: "reset zoom to default" },
|
||||||
{ name: "z/Z", desc: "increase/decrease visibility" },
|
{ name: "z/Z", desc: "increase/decrease visibility" },
|
||||||
|
|
47
keyboard.xml
47
keyboard.xml
|
@ -769,12 +769,27 @@ top down before the key bindings are parsed.
|
||||||
|
|
||||||
<key n="84">
|
<key n="84">
|
||||||
<name>T</name>
|
<name>T</name>
|
||||||
<desc>Decrease warp delta</desc>
|
<desc>Warp time backwards</desc>
|
||||||
|
<repeatable type="bool">true</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-adjust</command>
|
<command>property-adjust</command>
|
||||||
<property>/sim/time/warp-delta</property>
|
<property>/sim/time/warp-delta</property>
|
||||||
<step type="int">-30</step>
|
<step type="int">-30</step>
|
||||||
|
<min type="int">-720</min>
|
||||||
</binding>
|
</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>
|
||||||
|
|
||||||
<key n="86">
|
<key n="86">
|
||||||
|
@ -786,6 +801,9 @@ top down before the key bindings are parsed.
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- disabling this method of adjusting warp following discussion on the
|
||||||
|
developer list
|
||||||
<key n="87">
|
<key n="87">
|
||||||
<name>W</name>
|
<name>W</name>
|
||||||
<desc>Decrease warp</desc>
|
<desc>Decrease warp</desc>
|
||||||
|
@ -795,6 +813,7 @@ top down before the key bindings are parsed.
|
||||||
<step type="int">-60</step>
|
<step type="int">-60</step>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
-->
|
||||||
|
|
||||||
<key n="88">
|
<key n="88">
|
||||||
<name>X</name>
|
<name>X</name>
|
||||||
|
@ -1013,28 +1032,25 @@ top down before the key bindings are parsed.
|
||||||
|
|
||||||
<key n="116">
|
<key n="116">
|
||||||
<name>t</name>
|
<name>t</name>
|
||||||
<desc>Increase warp delta</desc>
|
<desc>Warp time forwards</desc>
|
||||||
|
<repeatable type="bool">true</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-adjust</command>
|
<command>property-adjust</command>
|
||||||
<property>/sim/time/warp-delta</property>
|
<property>/sim/time/warp-delta</property>
|
||||||
<step type="int">30</step>
|
<step type="int">30</step>
|
||||||
|
<max type="int">720</max>
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>show-message</command>
|
||||||
<script>
|
<id>warp-feedback</id>
|
||||||
(func(x) {
|
<label>Current time: %s</label>
|
||||||
settimer(func {
|
<property>/instrumentation/clock/local-short-string</property>
|
||||||
x == t_id or return;
|
|
||||||
gui.popupTip("resetting warp");
|
|
||||||
setprop("/sim/time/warp-delta", 0);
|
|
||||||
}, 1, 1)
|
|
||||||
})(t_id += 1)
|
|
||||||
</script>
|
|
||||||
</binding>
|
</binding>
|
||||||
<mod-up>
|
<mod-up>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>property-assign</command>
|
||||||
<script>t_id += 1</script>
|
<property>/sim/time/warp-delta</property>
|
||||||
|
<value type="int">0</value>
|
||||||
</binding>
|
</binding>
|
||||||
</mod-up>
|
</mod-up>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1048,6 +1064,7 @@ top down before the key bindings are parsed.
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
|
<!--
|
||||||
<key n="119">
|
<key n="119">
|
||||||
<name>w</name>
|
<name>w</name>
|
||||||
<desc>Increase warp</desc>
|
<desc>Increase warp</desc>
|
||||||
|
@ -1056,7 +1073,7 @@ top down before the key bindings are parsed.
|
||||||
<property>/sim/time/warp</property>
|
<property>/sim/time/warp</property>
|
||||||
<step type="int">60</step>
|
<step type="int">60</step>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key> -->
|
||||||
|
|
||||||
<key n="120">
|
<key n="120">
|
||||||
<name>x</name>
|
<name>x</name>
|
||||||
|
|
Loading…
Reference in a new issue