mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 07:17:51 +00:00
Push more widget painting code into ui::Painter
Hide knowledge of damage tracking strategy.
This commit is contained in:
@@ -73,6 +73,13 @@ void Painter::fill_rectangle(const Rect r, const Color c) {
|
||||
display.fill_rectangle(r, c);
|
||||
}
|
||||
|
||||
void Painter::paint_widget_tree(Widget* const w) {
|
||||
if( ui::is_dirty() ) {
|
||||
paint_widget(w);
|
||||
ui::dirty_clear();
|
||||
}
|
||||
}
|
||||
|
||||
void Painter::paint_widget(Widget* const w) {
|
||||
if( w->hidden() ) {
|
||||
// Mark widget (and all children) as invisible.
|
||||
|
Reference in New Issue
Block a user