From 8f0ba6e119ad6bd3c9db5d82e14ad832df732b04 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 23 Apr 2024 18:43:29 +0700 Subject: [PATCH] menu fixes * Esc key doesn't change input mode * Fix warning and help messages in mouse mode --- src/mn_menu.c | 4 ++++ src/mn_setup.c | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mn_menu.c b/src/mn_menu.c index 6282bb38..ca755001 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -2581,6 +2581,10 @@ boolean M_Responder(event_t *ev) return false; case ev_keydown: + if (menu_input == mouse_mode && M_InputActivated(input_menu_escape)) + { + break; + } menu_input = key_mode; ch = ev->data1; break; diff --git a/src/mn_setup.c b/src/mn_setup.c index b7e05e7e..21c4ee33 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -922,18 +922,14 @@ void MN_DrawDelVerify(void) static void DrawInstructions() { - int flags = current_menu[set_item_on].m_flags; + int index = (menu_input == mouse_mode ? highlight_item : set_item_on); + int flags = current_menu[index].m_flags; if (ItemDisabled(flags) || print_warning_about_changes > 0) { return; } - if (menu_input == mouse_mode && !(flags & S_HILITE)) - { - return; - } - // There are different instruction messages depending on whether you // are changing an item or just sitting on it. @@ -2926,6 +2922,7 @@ boolean MN_SetupCursorPostion(int x, int y) if (highlight_item != i) { + print_warning_about_changes = false; highlight_item = i; M_StartSound(sfx_itemup); }