mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-23 17:01:31 -04:00
Paint background of Text object before string.
This commit is contained in:
parent
c1f7f23367
commit
a13e19a907
2 changed files with 8 additions and 2 deletions
|
@ -291,9 +291,14 @@ void Text::set(const std::string value) {
|
|||
}
|
||||
|
||||
void Text::paint(Painter& painter) {
|
||||
const auto rect = screen_rect();
|
||||
const auto s = style();
|
||||
|
||||
painter.fill_rectangle(rect, s.background);
|
||||
|
||||
painter.draw_string(
|
||||
screen_pos(),
|
||||
style(),
|
||||
rect.pos,
|
||||
s,
|
||||
text
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue