From 571a44cd8dca7bea9f253d83358281d902441654 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 28 Dec 2014 21:34:54 +0000 Subject: [PATCH] Menus: Mouse controls now respect MenuEntry_t's disabled flag. git-svn-id: https://svn.eduke32.com/eduke32@4864 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/menus.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 54fa36c3a..1d4160525 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -3530,6 +3530,9 @@ static int32_t M_RunMenu_MenuMenu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *cur menu->currentEntry = e; M_RunMenuInput_MenuMenu_MovementVerify(menu); + if (entry->flags & Disabled) + break; + M_RunMenuInput_MenuEntryLink_Activate(entry); if (g_player[myconnectindex].ps->gm&MODE_MENU) // for skill selection @@ -3572,6 +3575,9 @@ static int32_t M_RunMenu_MenuMenu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *cur menu->currentEntry = e; M_RunMenuInput_MenuMenu_MovementVerify(menu); + if (entry->flags & Disabled) + break; + M_RunMenuInput_MenuEntryOption_Activate(entry, object); S_PlaySound(PISTOL_BODYHIT); @@ -3620,6 +3626,9 @@ static int32_t M_RunMenu_MenuMenu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *cur M_RunMenuInput_MenuMenu_MovementVerify(menu); menu->currentColumn = 1; + if (entry->flags & Disabled) + break; + M_RunMenuInput_MenuEntryCustom2Col_Activate(entry); S_PlaySound(PISTOL_BODYHIT); @@ -3640,6 +3649,9 @@ static int32_t M_RunMenu_MenuMenu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *cur M_RunMenuInput_MenuMenu_MovementVerify(menu); menu->currentColumn = 0; + if (entry->flags & Disabled) + break; + M_RunMenuInput_MenuEntryCustom2Col_Activate(entry); S_PlaySound(PISTOL_BODYHIT); @@ -3719,6 +3731,9 @@ static int32_t M_RunMenu_MenuMenu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *cur menu->currentEntry = e; M_RunMenuInput_MenuMenu_MovementVerify(menu); + if (entry->flags & Disabled) + break; + // region between the x-midline of the slidepoint at the extremes slides proportionally if (M_MouseWithinBounds(&m_mousepos, slideregionx, slidebary, slideregionwidth, height)) { @@ -3810,6 +3825,9 @@ static int32_t M_RunMenu_MenuMenu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *cur menu->currentEntry = e; M_RunMenuInput_MenuMenu_MovementVerify(menu); + if (entry->flags & Disabled) + break; + // region between the x-midline of the slidepoint at the extremes slides proportionally if (M_MouseWithinBounds(&m_mousepos, slideregionx, slidebary, slideregionwidth, height)) { @@ -3901,6 +3919,9 @@ static int32_t M_RunMenu_MenuMenu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *cur menu->currentEntry = e; M_RunMenuInput_MenuMenu_MovementVerify(menu); + if (entry->flags & Disabled) + break; + // region between the x-midline of the slidepoint at the extremes slides proportionally if (M_MouseWithinBounds(&m_mousepos, slideregionx, slidebary, slideregionwidth, height)) { @@ -3976,6 +3997,9 @@ static int32_t M_RunMenu_MenuMenu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *cur menu->currentEntry = e; M_RunMenuInput_MenuMenu_MovementVerify(menu); + if (entry->flags & Disabled) + break; + M_RunMenuInput_MenuEntryString_Activate(entry); S_PlaySound(PISTOL_BODYHIT); @@ -5219,6 +5243,9 @@ static void M_RunMenuInput(Menu_t *cm) case String: { + if (currentry->flags & Disabled) + break; + if (I_AdvanceTrigger()) { I_AdvanceTriggerClear();