adjust automap level title color with preset (#1379)

* adjust automap level title color with preset

Fixes #1378

* grammar
This commit is contained in:
Fabian Greffrath 2024-01-09 09:35:22 +01:00 committed by GitHub
parent 6cccb75184
commit 7f19988f65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -31,6 +31,7 @@
#include "d_deh.h" // Ty 03/27/98 - externalizations
#include "m_input.h"
#include "m_menu.h"
#include "hu_stuff.h"
//jff 1/7/98 default automap colors added
int mapcolor_back; // map background
@ -2316,6 +2317,9 @@ void AM_ColorPreset (void)
{&mapcolor_frnd, {252, 252, 4}}, // am_thingcolor_friend
{&mapcolor_enemy, {177, 112, 4}}, // am_thingcolor_monster
{&mapcolor_item, {231, 112, 4}}, // am_thingcolor_item
{&hudcolor_titl, {CR_GOLD, CR_NONE, CR_GRAY}}, // DrawAutomapHUD()
{NULL, { 0, 0, 0}},
};
@ -2325,6 +2329,12 @@ void AM_ColorPreset (void)
{
*mapcolors[i].var = mapcolors[i].color[mapcolor_preset];
}
// [FG] immediately apply changes if the automap is visible through the menu
if (automapactive && menu_background != background_on)
{
HU_Start();
}
}
//----------------------------------------------------------------------------

View File

@ -3050,7 +3050,8 @@ boolean M_ParseOption(const char *p, boolean wad)
return 1;
// [FG] bind mapcolor options to the mapcolor preset menu item
if (strncmp(name, "mapcolor_", 9) == 0)
if (strncmp(name, "mapcolor_", 9) == 0 ||
strcmp(name, "hudcolor_titl") == 0)
{
default_t *dp_preset = M_LookupDefault("mapcolor_preset");
dp->setup_menu = dp_preset->setup_menu;