From e09e75b6a973a777d0e3fb683e6c703cabf84d6a Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Mon, 7 Nov 2022 08:16:47 +0100 Subject: [PATCH] Rename WidgetSystem::system to ::render --- src/gui/widget.rs | 4 ++-- src/gui/widgets/toolbar.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/widget.rs b/src/gui/widget.rs index a2d197e..aa11a4e 100644 --- a/src/gui/widget.rs +++ b/src/gui/widget.rs @@ -14,7 +14,7 @@ use { }; pub(crate) trait WidgetSystem: SystemParam { - fn system(world: &mut World, state: &mut SystemState, ui: &mut Ui, id: WidgetId); + fn render(world: &mut World, state: &mut SystemState, ui: &mut Ui, id: WidgetId); } pub(crate) fn widget(world: &mut World, ui: &mut Ui, id: WidgetId) { @@ -36,7 +36,7 @@ pub(crate) fn widget(world: &mut World, ui: &mut Ui, _ = states.instances.insert(id, SystemState::new(world)); } let cached_state = states.instances.get_mut(&id).unwrap(); - S::system(world, cached_state, ui, id); + S::render(world, cached_state, ui, id); cached_state.apply(world); }); } diff --git a/src/gui/widgets/toolbar.rs b/src/gui/widgets/toolbar.rs index e068a2b..ca99a55 100644 --- a/src/gui/widgets/toolbar.rs +++ b/src/gui/widgets/toolbar.rs @@ -170,7 +170,7 @@ pub(crate) struct ToolbarWidget<'w, 's> { _phantom: PhantomData<(&'w (), &'s ())>, } impl WidgetSystem for ToolbarWidget<'_, '_> { - fn system(world: &mut World, _state: &mut SystemState, ui: &mut Ui, _id: WidgetId) { + fn render(world: &mut World, _state: &mut SystemState, ui: &mut Ui, _id: WidgetId) { ui.with_layout( Layout::left_to_right(bevy_egui::egui::Align::Center), |ui| {