Fix up the backend so it has sane names like get_sprite and get_icon, then implemented a guecs::Icon for icons. Those don't scale and typically have other properties different from a Sprite.
This commit is contained in:
parent
31a02505aa
commit
5a7c096b52
9 changed files with 76 additions and 29 deletions
|
@ -93,8 +93,7 @@ struct ClickerUI {
|
|||
if(name != "clicker") {
|
||||
$gui.set<guecs::Rectangle>(id, {});
|
||||
$gui.set<guecs::Effect>(id, {});
|
||||
$gui.set<guecs::Sprite>(id, { "clicker_treat_bone" });
|
||||
fmt::println("button dim: {},{}", cell.w, cell.h);
|
||||
$gui.set<guecs::Icon>(id, { "clicker_treat_bone" });
|
||||
$gui.set<guecs::Clickable>(id, {
|
||||
[&](auto, auto) { handle_button(Event::A_BUTTON); }
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue