From 88269d5d60eece85ca602451f2b0ea2658174ed0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Mar 2010 11:05:52 +0000 Subject: [PATCH] - fixed: The color sliders on the player setup menu were not disabled when a predefined colorset was selected. SVN r2203 (trunk) --- src/m_menu.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/m_menu.cpp b/src/m_menu.cpp index 7628b336e..299dbc53f 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -548,6 +548,14 @@ static oldmenuitem_t PlayerSetupMenu[] = { 2,0,'a',NULL,M_ChangeAutoAim, CR_UNTRANSLATED} }; +enum +{ + // These must be changed if the menu definition is altered + PSM_RED = 3, + PSM_GREEN = 4, + PSM_BLUE = 5, +}; + static oldmenu_t PSetupDef = { countof(PlayerSetupMenu), @@ -2753,6 +2761,11 @@ static void M_ChangeColorSet (int choice) } mycolorset = (curpos >= 0) ? PlayerColorSets[curpos] : -1; + // disable the sliders if a valid colorset is selected + PlayerSetupMenu[PSM_RED].status = + PlayerSetupMenu[PSM_GREEN].status = + PlayerSetupMenu[PSM_BLUE].status = (mycolorset == -1? 2:-1); + char command[24]; mysnprintf(command, countof(command), "colorset %d", mycolorset); C_DoCommand(command);