From d854c6196032da85c5588b42ed56ba24fd779064 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 30 Jun 2020 21:53:11 -0700 Subject: [PATCH] Add Shift+F1/F2/F3 hotkeys Allowing users to reverse cycle tilesets/tilecols/enemies prevents them from having to press the hotkey a zillion times in order to get to the one they want if the one they want just happens to be behind the current one they're on. --- desktop_version/src/editor.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 98bfdd72..b01f9e7b 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -4573,6 +4573,24 @@ void editorinput() else if (key.keymap[SDLK_LSHIFT] || key.keymap[SDLK_RSHIFT]) { // Shift modifiers + if (key.keymap[SDLK_F1]) + { + ed.switch_tileset(true); + graphics.backgrounddrawn = false; + ed.keydelay = 6; + } + if (key.keymap[SDLK_F2]) + { + ed.switch_tilecol(true); + graphics.backgrounddrawn = false; + ed.keydelay = 6; + } + if (key.keymap[SDLK_F3]) + { + ed.switch_enemy(true); + ed.keydelay=6; + } + if (up_pressed || down_pressed || left_pressed || right_pressed) { ed.keydelay=6;