mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-23 15:01:14 -04:00
Move widget tree painting to ui::Painter.
Still doesn't seem like the right place, but better than the event dispatcher!
This commit is contained in:
parent
a9bb7c96e5
commit
872c998ff1
3 changed files with 32 additions and 25 deletions
|
@ -37,6 +37,8 @@ struct Style {
|
|||
Style invert() const;
|
||||
};
|
||||
|
||||
class Widget;
|
||||
|
||||
class Painter {
|
||||
public:
|
||||
Painter() { };
|
||||
|
@ -51,6 +53,8 @@ public:
|
|||
void draw_rectangle(const Rect r, const Color c);
|
||||
void fill_rectangle(const Rect r, const Color c);
|
||||
|
||||
void paint_widget(Widget* const w);
|
||||
|
||||
private:
|
||||
void draw_hline(Point p, size_t width, const Color c);
|
||||
void draw_vline(Point p, size_t height, const Color c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue