fix Draw (redraw)

This commit is contained in:
2026-02-21 00:19:39 -05:00
parent 426ff0adfc
commit 1aadef0e7e
3 changed files with 11 additions and 7 deletions

View File

@@ -146,12 +146,14 @@ impl<State> UiRsc for DefaultRsc<State> {
&mut self.ui
}
fn on_draw(&mut self, active: &ActiveData) {
fn on_draw(&mut self, active: &ActiveData, redrawn: bool) {
self.events.draw(active);
self.widget_events.push(WidgetEvent {
id: active.id,
ty: WidgetEventType::Draw,
});
if !redrawn {
self.widget_events.push(WidgetEvent {
id: active.id,
ty: WidgetEventType::Draw,
});
}
}
fn on_undraw(&mut self, active: &ActiveData) {