Support ui::element::post_draw invoked after children draw
This commit is contained in:
parent
d1dc84bdde
commit
015307cbec
2 changed files with 2 additions and 0 deletions
|
|
@ -59,6 +59,7 @@ namespace psemek::ui
|
|||
virtual void update(float /* dt */) {}
|
||||
|
||||
virtual void draw(painter & p) const = 0;
|
||||
virtual void post_draw(painter & /* p */) const {}
|
||||
|
||||
virtual ~element() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ namespace psemek::ui
|
|||
elem->draw(impl().painter);
|
||||
for (auto c : elem->children())
|
||||
if (c) self(c);
|
||||
elem->post_draw(impl().painter);
|
||||
});
|
||||
|
||||
visitor(impl().root.get());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue