X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=e76026e17bfc68c3c468eedc59421fcdc08a1ff3;hb=e0bf8eee0aec424593e68e37e35c6b6f120e4712;hp=366acd1a4fa83215d053491484e12c7006501020;hpb=d7ccee72a45b60edf4b581780e932ef4482276cc;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index 366acd1a..e76026e1 100644 --- a/src/events.c +++ b/src/events.c @@ -462,7 +462,7 @@ static boolean is_string_suffix(char *string, char *suffix) #define MAX_CHEAT_INPUT_LEN 32 -static void HandleKeysCheating(Key key) +static void HandleKeysSpecial(Key key) { static char cheat_input[2 * MAX_CHEAT_INPUT_LEN + 1] = ""; char letter = getCharFromKey(key); @@ -541,6 +541,14 @@ static void HandleKeysCheating(Key key) EL_DYNAMITE; #endif } + else if (game_status == GAME_MODE_EDITOR) + { + if (is_string_suffix(cheat_input, ":dump-brush") || + is_string_suffix(cheat_input, ":DB")) + { + DumpBrush(); + } + } } void HandleKey(Key key, int key_status) @@ -688,10 +696,10 @@ void HandleKey(Key key, int key_status) TapeQuickLoad(); else if (key == setup.shortcut.toggle_pause) TapeTogglePause(TAPE_TOGGLE_MANUAL); - - HandleKeysCheating(key); } + HandleKeysSpecial(key); + if (HandleGadgetsKeyInput(key)) { if (key != KSYM_Escape) /* always allow ESC key to be handled */