mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- 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:
parent
0569d948df
commit
88269d5d60
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue