- fixed: The color sliders on the player setup menu were not disabled when a predefined colorset was selected.

SVN r2203 (trunk)
This commit is contained in:
Christoph Oelckers 2010-03-07 11:05:52 +00:00
parent 0569d948df
commit 88269d5d60

View file

@ -548,6 +548,14 @@ static oldmenuitem_t PlayerSetupMenu[] =
{ 2,0,'a',NULL,M_ChangeAutoAim, CR_UNTRANSLATED} { 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 = static oldmenu_t PSetupDef =
{ {
countof(PlayerSetupMenu), countof(PlayerSetupMenu),
@ -2753,6 +2761,11 @@ static void M_ChangeColorSet (int choice)
} }
mycolorset = (curpos >= 0) ? PlayerColorSets[curpos] : -1; 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]; char command[24];
mysnprintf(command, countof(command), "colorset %d", mycolorset); mysnprintf(command, countof(command), "colorset %d", mycolorset);
C_DoCommand(command); C_DoCommand(command);