From f2f167445158e365c8320ecd8bcf70c98d782e9c Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Mon, 25 Aug 2025 19:45:35 -0500 Subject: [PATCH] Rename machine button spawner, "big red button" It's the big red button. Don't press it. Or do. --- src/widgets/machines.rs | 6 +++--- src/widgets/mod.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/machines.rs b/src/widgets/machines.rs index 425aa29..0fe6a41 100644 --- a/src/widgets/machines.rs +++ b/src/widgets/machines.rs @@ -2,7 +2,7 @@ use bevy::{color::palettes::css::*, prelude::*, ui::Val::*}; use crate::{ game::machines::*, - widgets::{machine_ui_base, spawn_machine_button}, + widgets::{machine_ui_base, spawn_big_red_button}, }; impl CuttingMachine { @@ -42,7 +42,7 @@ impl CuttingMachine { BackgroundColor(DARK_GRAY.into()), Pickable::default(), )) - .with_children(|cmds| spawn_machine_button(cmds, "CUT")); + .with_children(|cmds| spawn_big_red_button(cmds, "CUT")); }); } } @@ -83,7 +83,7 @@ impl RotatingMachine { BackgroundColor(DARK_GRAY.into()), Pickable::default(), )) - .with_children(|cmds| spawn_machine_button(cmds, "TURN")); + .with_children(|cmds| spawn_big_red_button(cmds, "TURN")); }); } } diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index d946810..9ec6edc 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -57,7 +57,7 @@ fn machine_ui_base(header: impl Into) -> impl Bundle { } // TODO: Hook up action handling (callback? Observer? Some other weird component?) -fn spawn_machine_button(commands: &mut ChildSpawnerCommands, text: impl Into) { +fn spawn_big_red_button(commands: &mut ChildSpawnerCommands, text: impl Into) { let mut builder = commands.spawn(( Button, Node {