Add missing SAO UI on_resize() impls

This commit is contained in:
mars 2022-11-05 14:28:07 -06:00
parent eb32163b24
commit 75e0aca668
2 changed files with 6 additions and 2 deletions

View File

@ -45,9 +45,11 @@ impl PanelImpl for ConfirmationDialogPanel {
self.dialog.draw(&ctx);
}
fn on_cursor_event(&mut self, kind: CursorEventKind, at: canary_script::Vec2) {
fn on_cursor_event(&mut self, kind: CursorEventKind, at: Vec2) {
self.dialog.on_cursor_event(kind, at.into());
}
fn on_resize(&mut self, _size: Vec2) {}
fn on_message(&mut self, _msg: Message) {}
}

View File

@ -31,10 +31,12 @@ impl PanelImpl for MainMenuPanel {
Widget::draw(&mut self.menu, &ctx);
}
fn on_cursor_event(&mut self, kind: CursorEventKind, at: canary_script::Vec2) {
fn on_cursor_event(&mut self, kind: CursorEventKind, at: Vec2) {
Widget::on_cursor_event(&mut self.menu, kind, at.into());
}
fn on_resize(&mut self, _size: Vec2) {}
fn on_message(&mut self, msg: Message) {}
}