mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-29 20:50:38 +00:00
Fixed the menu highlight thing
This commit is contained in:
parent
e5d4020f3e
commit
20cfd80767
3 changed files with 12 additions and 5 deletions
|
@ -1406,6 +1406,7 @@ static void HU_drawChatLog(INT32 offset)
|
||||||
INT32 x = chatx+2, y, dx = 0, dy = 0;
|
INT32 x = chatx+2, y, dx = 0, dy = 0;
|
||||||
UINT32 i = 0;
|
UINT32 i = 0;
|
||||||
INT32 chat_topy, chat_bottomy;
|
INT32 chat_topy, chat_bottomy;
|
||||||
|
INT32 highlight = HU_GetHighlightColor();
|
||||||
boolean atbottom = false;
|
boolean atbottom = false;
|
||||||
|
|
||||||
// make sure that our scroll position isn't "illegal";
|
// make sure that our scroll position isn't "illegal";
|
||||||
|
@ -1503,12 +1504,12 @@ static void HU_drawChatLog(INT32 offset)
|
||||||
if (chat_scroll > 0)
|
if (chat_scroll > 0)
|
||||||
{
|
{
|
||||||
V_DrawCharacter(chatx-9, ((justscrolledup) ? (chat_topy-1) : (chat_topy)),
|
V_DrawCharacter(chatx-9, ((justscrolledup) ? (chat_topy-1) : (chat_topy)),
|
||||||
'\x1A' | V_SNAPTOBOTTOM | V_SNAPTOLEFT | highlightflags, false); // up arrow
|
'\x1A' | V_SNAPTOBOTTOM | V_SNAPTOLEFT | highlight, false); // up arrow
|
||||||
}
|
}
|
||||||
if (chat_scroll < chat_maxscroll)
|
if (chat_scroll < chat_maxscroll)
|
||||||
{
|
{
|
||||||
V_DrawCharacter(chatx-9, chat_bottomy-((justscrolleddown) ? 5 : 6),
|
V_DrawCharacter(chatx-9, chat_bottomy-((justscrolleddown) ? 5 : 6),
|
||||||
'\x1B' | V_SNAPTOBOTTOM | V_SNAPTOLEFT | highlightflags, false); // down arrow
|
'\x1B' | V_SNAPTOBOTTOM | V_SNAPTOLEFT | highlight, false); // down arrow
|
||||||
}
|
}
|
||||||
|
|
||||||
justscrolleddown = false;
|
justscrolleddown = false;
|
||||||
|
|
|
@ -1586,7 +1586,7 @@ menu_t MISC_HelpDef = IMAGEDEF(MISC_HelpMenu);
|
||||||
// See also G_GetGametypeColor.
|
// See also G_GetGametypeColor.
|
||||||
//
|
//
|
||||||
|
|
||||||
static INT32 recommendedflags, warningflags;
|
static INT32 highlightflags, recommendedflags, warningflags;
|
||||||
|
|
||||||
inline static void M_GetGametypeColor(void)
|
inline static void M_GetGametypeColor(void)
|
||||||
{
|
{
|
||||||
|
@ -1646,6 +1646,13 @@ inline static void M_GetGametypeColor(void)
|
||||||
highlightflags = V_YELLOWMAP; // FALLBACK
|
highlightflags = V_YELLOWMAP; // FALLBACK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// excuse me but I'm extremely lazy:
|
||||||
|
INT32 HU_GetHighlightColor(void)
|
||||||
|
{
|
||||||
|
M_GetGametypeColor(); // update flag colour reguardless of the menu being opened or not.
|
||||||
|
return highlightflags;
|
||||||
|
}
|
||||||
|
|
||||||
// Sky Room
|
// Sky Room
|
||||||
menu_t SR_PandoraDef =
|
menu_t SR_PandoraDef =
|
||||||
{
|
{
|
||||||
|
|
|
@ -228,8 +228,7 @@ void Screenshot_option_Onchange(void);
|
||||||
// Addons menu updating
|
// Addons menu updating
|
||||||
void Addons_option_Onchange(void);
|
void Addons_option_Onchange(void);
|
||||||
|
|
||||||
// This is now defined here so that the chat arrows can also benefit from the highlight to look good.
|
INT32 HU_GetHighlightColor(void);
|
||||||
INT32 highlightflags;
|
|
||||||
|
|
||||||
// These defines make it a little easier to make menus
|
// These defines make it a little easier to make menus
|
||||||
#define DEFAULTMENUSTYLE(header, source, prev, x, y)\
|
#define DEFAULTMENUSTYLE(header, source, prev, x, y)\
|
||||||
|
|
Loading…
Reference in a new issue