mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-17 23:21:05 +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;
|
||||
UINT32 i = 0;
|
||||
INT32 chat_topy, chat_bottomy;
|
||||
INT32 highlight = HU_GetHighlightColor();
|
||||
boolean atbottom = false;
|
||||
|
||||
// make sure that our scroll position isn't "illegal";
|
||||
|
@ -1503,12 +1504,12 @@ static void HU_drawChatLog(INT32 offset)
|
|||
if (chat_scroll > 0)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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;
|
||||
|
|
|
@ -1586,7 +1586,7 @@ menu_t MISC_HelpDef = IMAGEDEF(MISC_HelpMenu);
|
|||
// See also G_GetGametypeColor.
|
||||
//
|
||||
|
||||
static INT32 recommendedflags, warningflags;
|
||||
static INT32 highlightflags, recommendedflags, warningflags;
|
||||
|
||||
inline static void M_GetGametypeColor(void)
|
||||
{
|
||||
|
@ -1646,6 +1646,13 @@ inline static void M_GetGametypeColor(void)
|
|||
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
|
||||
menu_t SR_PandoraDef =
|
||||
{
|
||||
|
|
|
@ -228,8 +228,7 @@ void Screenshot_option_Onchange(void);
|
|||
// Addons menu updating
|
||||
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 highlightflags;
|
||||
INT32 HU_GetHighlightColor(void);
|
||||
|
||||
// These defines make it a little easier to make menus
|
||||
#define DEFAULTMENUSTYLE(header, source, prev, x, y)\
|
||||
|
|
Loading…
Reference in a new issue