diff --git a/src/widgets/machines.rs b/src/widgets/machines.rs index ac8c10b..c96ec32 100644 --- a/src/widgets/machines.rs +++ b/src/widgets/machines.rs @@ -3,11 +3,11 @@ use bevy::{color::palettes::css::*, prelude::*, ui::Val::*}; use crate::{ game::machines::*, resources::UiTheme, - widgets::{BigRedButton, machine_ui_base}, + widgets::{BigRedButton, SpawnUi, machine_ui_base}, }; -impl CuttingMachine { - pub fn spawn_ui(mut commands: Commands, theme: Res) { +impl SpawnUi for CuttingMachine { + fn spawn_ui(mut commands: Commands, theme: Res) { let base_entity = machine_ui_base(&mut commands, "Cutting Machine", &theme); commands.entity(base_entity).with_children(|commands| { // Left panel. For fuel or machine stats or whatever. @@ -51,8 +51,8 @@ impl CuttingMachine { } } -impl RotatingMachine { - pub fn spawn_ui(mut commands: Commands, theme: Res) { +impl SpawnUi for RotatingMachine { + fn spawn_ui(mut commands: Commands, theme: Res) { let base_entity = machine_ui_base(&mut commands, "Rotating Machine", &theme); commands.entity(base_entity).with_children(|commands| { commands.spawn((