You can now set a sprite as a background in Background which will simplify a lot of games that just place sprites over a single image.

This commit is contained in:
Zed A. Shaw 2025-06-01 22:52:54 -04:00
parent 6fb20c5085
commit e1d61dc2c1
9 changed files with 79 additions and 22 deletions

View file

@ -81,7 +81,12 @@ struct ClickerUI {
}
void init() {
$gui.set<guecs::Background>($gui.MAIN, {$gui.$parser, {0, 0, 0, 255}});
guecs::Background bg{$gui.$parser, };
bg.set_color({0, 0, 0, 255});
bg.set_sprite("clicker_treat_bone");
$gui.set<guecs::Background>($gui.MAIN, bg);
for(auto& [name, cell] : $gui.cells()) {
auto id = $gui.entity(name);