mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-13 20:22:22 -04:00
Pretty icons
This commit is contained in:
parent
a67feb01fd
commit
c0909fa298
26 changed files with 436 additions and 82 deletions
|
@ -59,6 +59,15 @@ void MenuItemView::paint(Painter& painter) {
|
|||
r,
|
||||
final_bg_color
|
||||
);
|
||||
|
||||
if (item.bitmap) {
|
||||
painter.draw_bitmap(
|
||||
{ r.pos.x + 4, r.pos.y + 4 },
|
||||
*item.bitmap,
|
||||
final_item_color,
|
||||
final_bg_color
|
||||
);
|
||||
}
|
||||
|
||||
Style text_style {
|
||||
.font = paint_style.font,
|
||||
|
@ -67,7 +76,7 @@ void MenuItemView::paint(Painter& painter) {
|
|||
};
|
||||
|
||||
painter.draw_string(
|
||||
{ r.pos.x + 8, r.pos.y + (r.size.h - font_height) / 2 },
|
||||
{ r.pos.x + 26, r.pos.y + (r.size.h - font_height) / 2 },
|
||||
text_style,
|
||||
item.text
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue