From 163f3a0fde77d8e225308b04faa29dfd2705a3a0 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 9 Jan 2024 20:49:42 -0800 Subject: [PATCH] Allow using W and S in editor menus There was an inconsistency where W and S couldn't be used in place of the Up and Down arrow keys, but this has been fixed. This only applies where W and S otherwise are not bound to anything else. E.g. not the main editor (where W changes the warp direction and S saves the level) and not the script editor (where W and S can be typed inside a script), but the script list is fine. --- desktop_version/src/Editor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop_version/src/Editor.cpp b/desktop_version/src/Editor.cpp index 3dca8480..cae7d73b 100644 --- a/desktop_version/src/Editor.cpp +++ b/desktop_version/src/Editor.cpp @@ -3504,6 +3504,8 @@ void editorinput(void) // We're in the menu! case EditorState_MENU: + up_pressed |= key.isDown(KEYBOARD_w); + down_pressed |= key.isDown(KEYBOARD_s); switch (ed.substate) { @@ -3614,6 +3616,9 @@ void editorinput(void) { case EditorSubState_MAIN: { + up_pressed |= key.isDown(KEYBOARD_w); + down_pressed |= key.isDown(KEYBOARD_s); + if (escape_pressed) { music.playef(Sound_VIRIDIAN);