Rename WidgetSystem::system to ::render
This commit is contained in:
parent
2ffdd87712
commit
e09e75b6a9
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ use {
|
|||
};
|
||||
|
||||
pub(crate) trait WidgetSystem: SystemParam {
|
||||
fn system(world: &mut World, state: &mut SystemState<Self>, ui: &mut Ui, id: WidgetId);
|
||||
fn render(world: &mut World, state: &mut SystemState<Self>, ui: &mut Ui, id: WidgetId);
|
||||
}
|
||||
|
||||
pub(crate) fn widget<S: 'static + WidgetSystem>(world: &mut World, ui: &mut Ui, id: WidgetId) {
|
||||
|
@ -36,7 +36,7 @@ pub(crate) fn widget<S: 'static + WidgetSystem>(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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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<Self>, ui: &mut Ui, _id: WidgetId) {
|
||||
fn render(world: &mut World, _state: &mut SystemState<Self>, ui: &mut Ui, _id: WidgetId) {
|
||||
ui.with_layout(
|
||||
Layout::left_to_right(bevy_egui::egui::Align::Center),
|
||||
|ui| {
|
||||
|
|
Loading…
Reference in a new issue