Implement a way to map entities to their names, which comes up often enough.
This commit is contained in:
parent
e1d61dc2c1
commit
ad78c186c6
3 changed files with 12 additions and 0 deletions
|
@ -153,7 +153,9 @@ struct CalculatorUI {
|
|||
$gui.set<guecs::Background>($gui.MAIN, {$gui.$parser});
|
||||
|
||||
for(auto& [name, cell] : $gui.cells()) {
|
||||
// NOTE: quick test here for the ent->name functionality
|
||||
auto id = $gui.entity(name);
|
||||
assert(name == $gui.name_for(id) && "BUG! name and entity don't match");
|
||||
auto& label = LABELS.at(name);
|
||||
|
||||
$gui.set<guecs::Rectangle>(id, {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue