From fddc972010b958f20d8ade7171cf053834abf06a Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 15 Jan 2016 20:53:43 -0600 Subject: [PATCH] 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. --- Nasal/gui.nas | 3 +-- keyboard.xml | 57 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/Nasal/gui.nas b/Nasal/gui.nas index 0b780753a..52fa72ab0 100644 --- a/Nasal/gui.nas +++ b/Nasal/gui.nas @@ -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" }, diff --git a/keyboard.xml b/keyboard.xml index ce8dd61a9..2dc7212d6 100644 --- a/keyboard.xml +++ b/keyboard.xml @@ -111,7 +111,7 @@ top down before the key bindings are parsed. Tab Cycle mouse mode - + /devices/status/keyboard/alt /devices/status/keyboard/ctrl @@ -130,7 +130,7 @@ top down before the key bindings are parsed. /controls/flight/rudder 0.05 - + @@ -713,7 +713,7 @@ top down before the key bindings are parsed. nasal - + M @@ -769,12 +769,27 @@ top down before the key bindings are parsed. T - Decrease warp delta + Warp time backwards + true property-adjust /sim/time/warp-delta -30 + -720 + + show-message + warp-feedback + + /instrumentation/clock/local-short-string + + + + property-assign + /sim/time/warp-delta + 0 + + @@ -786,6 +801,9 @@ top down before the key bindings are parsed. + + X @@ -1013,29 +1032,26 @@ top down before the key bindings are parsed. t - Increase warp delta + Warp time forwards + true property-adjust /sim/time/warp-delta 30 + 720 - nasal - + show-message + warp-feedback + + /instrumentation/clock/local-short-string - - nasal - - + + property-assign + /sim/time/warp-delta + 0 + @@ -1048,6 +1064,7 @@ top down before the key bindings are parsed. + x