fix Draw (redraw)

This commit is contained in:
iris committed 2026-02-21 00:19:39 -05:00
1 parent 426ff0adfc
commit 1aadef0e7e
3 files changed
+11 -7

No files matched your search

+7 -5
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) {