mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-04 23:22:36 +00:00
Menus/Profiles Accessibility: use menu font, underlines and hand
This commit is contained in:
parent
a7db45c73b
commit
3a21bee937
1 changed files with 24 additions and 12 deletions
|
|
@ -16,10 +16,15 @@ namespace
|
||||||
|
|
||||||
void draw_routine()
|
void draw_routine()
|
||||||
{
|
{
|
||||||
Draw row = Draw(0, currentMenu->y).font(Draw::Font::kConsole);
|
Draw row = Draw(0, currentMenu->y).font(Draw::Font::kMenu);
|
||||||
|
|
||||||
M_DrawEditProfileTooltips();
|
M_DrawEditProfileTooltips();
|
||||||
|
|
||||||
|
if (optionsmenu.profile != NULL)
|
||||||
|
{
|
||||||
|
M_DrawProfileCard(optionsmenu.optx, optionsmenu.opty, false, optionsmenu.profile);
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < currentMenu->numitems; ++i)
|
for (int i = 0; i < currentMenu->numitems; ++i)
|
||||||
{
|
{
|
||||||
const menuitem_t& it = currentMenu->menuitems[i];
|
const menuitem_t& it = currentMenu->menuitems[i];
|
||||||
|
|
@ -30,6 +35,12 @@ void draw_routine()
|
||||||
|
|
||||||
Draw h = row.x(currentMenu->x);
|
Draw h = row.x(currentMenu->x);
|
||||||
|
|
||||||
|
if (selected)
|
||||||
|
{
|
||||||
|
M_DrawUnderline(h.x(), BASEVIDWIDTH - 18, h.y());
|
||||||
|
M_DrawCursorHand(h.x(), h.y());
|
||||||
|
}
|
||||||
|
|
||||||
if ((it.status & IT_HEADERTEXT) == IT_HEADERTEXT)
|
if ((it.status & IT_HEADERTEXT) == IT_HEADERTEXT)
|
||||||
{
|
{
|
||||||
h
|
h
|
||||||
|
|
@ -46,28 +57,29 @@ void draw_routine()
|
||||||
|
|
||||||
if ((it.status & IT_TYPE) == IT_CVAR)
|
if ((it.status & IT_TYPE) == IT_CVAR)
|
||||||
{
|
{
|
||||||
auto val = Draw::TextElement(it.itemaction.cvar->string).font(Draw::Font::kConsole);
|
bool isDefault = CV_IsSetToDefault(it.itemaction.cvar);
|
||||||
|
auto val = Draw::TextElement(it.itemaction.cvar->string).font(Draw::Font::kMenu);
|
||||||
|
|
||||||
h = row.x(BASEVIDWIDTH - 16).flags(highlightflags);
|
h = row.x(BASEVIDWIDTH - 18);
|
||||||
h.align(Draw::Align::kRight).text(val);
|
h.align(Draw::Align::kRight).flags(isDefault ? highlightflags : warningflags).text(val);
|
||||||
|
|
||||||
if (selected)
|
if (selected)
|
||||||
{
|
{
|
||||||
|
Draw ar = h.flags(highlightflags);
|
||||||
int ofs = skullAnimCounter / 5;
|
int ofs = skullAnimCounter / 5;
|
||||||
h.x(-val.width() - 10 - ofs).text("\x1C");
|
ar.x(-val.width() - 10 - ofs).text("\x1C");
|
||||||
h.x(2 + ofs).text("\x1D");
|
ar.x(2 + ofs).text("\x1D");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isDefault)
|
||||||
|
{
|
||||||
|
h.x(selected ? 12 : 5).y(-1).flags(warningflags).text(".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
row = row.y(11);
|
row = row.y(11);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, draw the card ontop
|
|
||||||
if (optionsmenu.profile != NULL)
|
|
||||||
{
|
|
||||||
M_DrawProfileCard(optionsmenu.optx, optionsmenu.opty, false, optionsmenu.profile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // namespace
|
}; // namespace
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue