2 Commits
Author SHA1 Message Date
robert 9fb374059a Fix: Delete trailing semicolon in BRB::bundle()
Normally this would be a compilation error, but Bevy has an
`impl Bundle for ()` somewhere.

The intended bundle content gets discarded and a unit is implicitly
returned. That unit is implicitly converted into a `Bundle`, satisfying
the compiler.
2025-08-26 13:17:38 -05:00
robert cf9b415bb7 Update BigRedButton usage sites, add callback note 2025-08-26 13:17:03 -05:00
2 changed files with 10 additions and 3 deletions
+9 -2
View File
@@ -42,7 +42,11 @@ impl CuttingMachine {
BackgroundColor(DARK_GRAY.into()),
Pickable::default(),
))
.with_children(|cmds| BigRedButton::spawn_big_red_button(cmds, "CUT"));
.with_children(|cmds| {
let _button_cmds = cmds.spawn(BigRedButton::bundle("CUT"));
// TODO: Attach on-press observer so this machine can do something
// in response to that button being pressed
});
});
}
}
@@ -82,7 +86,10 @@ impl RotatingMachine {
BackgroundColor(DARK_GRAY.into()),
Pickable::default(),
))
.with_children(|cmds| BigRedButton::spawn_big_red_button(cmds, "TURN"));
.with_children(|cmds| {
let button_cmds = cmds.spawn(BigRedButton::bundle("TURN"));
// TODO: Attach on-press observer to the button.
});
});
}
}
+1 -1
View File
@@ -120,7 +120,7 @@ impl BigRedButton {
TextColor(WHITE.into()),
TextShadow::default(),
],
);
)
}
/// Re-color the button when a pointer passes over it