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" },
|
||||||
|
|
57
keyboard.xml
57
keyboard.xml
|
@ -111,7 +111,7 @@ top down before the key bindings are parsed.
|
||||||
<name>Tab</name>
|
<name>Tab</name>
|
||||||
<desc>Cycle mouse mode</desc>
|
<desc>Cycle mouse mode</desc>
|
||||||
<binding>
|
<binding>
|
||||||
|
|
||||||
<condition>
|
<condition>
|
||||||
<not><property>/devices/status/keyboard/alt</property></not>
|
<not><property>/devices/status/keyboard/alt</property></not>
|
||||||
<not><property>/devices/status/keyboard/ctrl</property></not>
|
<not><property>/devices/status/keyboard/ctrl</property></not>
|
||||||
|
@ -130,7 +130,7 @@ top down before the key bindings are parsed.
|
||||||
<property>/controls/flight/rudder</property>
|
<property>/controls/flight/rudder</property>
|
||||||
<step type="double">0.05</step>
|
<step type="double">0.05</step>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
<!-- Ctrl-M generates Enter, but we want to show the map in that case -->
|
<!-- Ctrl-M generates Enter, but we want to show the map in that case -->
|
||||||
<mod-ctrl>
|
<mod-ctrl>
|
||||||
<binding>
|
<binding>
|
||||||
|
@ -713,7 +713,7 @@ top down before the key bindings are parsed.
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>aircraft.HUD.cycle_type()</script>
|
<script>aircraft.HUD.cycle_type()</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key n="77">
|
<key n="77">
|
||||||
<name>M</name>
|
<name>M</name>
|
||||||
|
@ -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,29 +1032,26 @@ 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>
|
||||||
</binding>
|
<value type="int">0</value>
|
||||||
|
</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