textscreen: Use cyan bg for window action hover.

This makes the hover background consistent with other widgets instead
of giving a black background that is inconsistent. As part of this,
change the foreground text color when hovering so that the foreground
does not clash with the background, and the text stays readable.
This commit is contained in:
Simon Howard 2018-12-28 16:25:55 -05:00
parent 700644d667
commit 12c984cff8

View file

@ -43,17 +43,16 @@ static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action))
static void TXT_WindowActionDrawer(TXT_UNCAST_ARG(action))
{
TXT_CAST_ARG(txt_window_action_t, action);
int hovering;
char buf[10];
TXT_GetKeyDescription(action->key, buf, sizeof(buf));
if (TXT_HoveringOverWidget(action))
{
TXT_BGColor(TXT_COLOR_BLACK, 0);
}
hovering = TXT_HoveringOverWidget(action);
TXT_SetWidgetBG(action);
TXT_DrawString(" ");
TXT_FGColor(TXT_COLOR_BRIGHT_GREEN);
TXT_FGColor(hovering ? TXT_COLOR_BRIGHT_WHITE : TXT_COLOR_BRIGHT_GREEN);
TXT_DrawString(buf);
TXT_FGColor(TXT_COLOR_BRIGHT_CYAN);
TXT_DrawString("=");