diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index 367090a..6b0a74a 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -91,9 +91,12 @@ fn machine_ui_base(commands: &mut Commands, header: impl Into, theme: &U pub struct BigRedButton; impl BigRedButton { - // TODO: Hook up action handling (callback? Observer? Some other weird component?) - fn spawn_big_red_button(commands: &mut ChildSpawnerCommands, text: impl Into) { - let mut builder = commands.spawn(( + /// Default bundle for a Big Red Button. Remember to attach on-press observers! + /// + /// I haven't figure out what will receive the on-press events, so I'm moving + /// the problem. It will not be the button's job to hook up the event notice. + fn bundle(text: impl Into) -> impl Bundle { + ( Button, BigRedButton, Node { @@ -117,7 +120,7 @@ impl BigRedButton { TextColor(WHITE.into()), TextShadow::default(), ], - )); + ); } /// Re-color the button when a pointer passes over it