Now have a do_if on GUECS for many of the 'if this exists do this' patterns.
This commit is contained in:
parent
2ecef8d9f9
commit
57e042e786
5 changed files with 17 additions and 14 deletions
|
@ -51,6 +51,7 @@ namespace gui {
|
|||
$gui.set<Sprite>(button, {
|
||||
fmt::format("{}-64", junk_list[button % junk_list.size()])});
|
||||
$gui.set<Effect>(button, {0.4f});
|
||||
$gui.set<Sound>(button, {"ui_click"});
|
||||
$gui.set<Clickable>(button, {
|
||||
[&](auto ent, auto){ inv_slot_clicked(ent); }
|
||||
});
|
||||
|
@ -58,6 +59,7 @@ namespace gui {
|
|||
$gui.set<Clickable>(button, {
|
||||
[&](auto, auto){ toggle(); }
|
||||
});
|
||||
$gui.set<Sound>(button, {"pickup"});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue