mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-13 04:02:23 -04:00
"At least it builds !"
This commit is contained in:
parent
1b0da68d65
commit
2fcfdba9ea
19 changed files with 46 additions and 87 deletions
|
@ -52,20 +52,10 @@ void MenuItemView::paint(Painter& painter) {
|
|||
r,
|
||||
paint_style.background
|
||||
);
|
||||
|
||||
ui::Color final_item_color = item.color;
|
||||
|
||||
if (final_item_color.v == paint_style.background.v) final_item_color = paint_style.foreground;
|
||||
|
||||
Style text_style {
|
||||
.font = paint_style.font,
|
||||
.background = paint_style.background,
|
||||
.foreground = final_item_color
|
||||
};
|
||||
|
||||
|
||||
painter.draw_string(
|
||||
{ static_cast<Coord>(r.pos.x + 8), static_cast<Coord>(r.pos.y + (r.size.h - font_height) / 2) },
|
||||
text_style,
|
||||
{ r.pos.x + 8, r.pos.y + (r.size.h - font_height) / 2 },
|
||||
paint_style,
|
||||
item.text
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue