From 389690e5c35f0998dcc373aa18fb0614ca4db1a4 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 22 Feb 2025 22:27:56 -0500 Subject: [PATCH] Optimize GUECS a bit so that it automatically sets up the cell names and lel::Cell contents in the world, making it easier to work with. --- combat_ui.cpp | 2 -- guecs.cpp | 5 +++++ overlay_ui.cpp | 5 ----- status_ui.cpp | 2 -- tests/sound.cpp | 4 ++-- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/combat_ui.cpp b/combat_ui.cpp index eb43103..96a5ddc 100644 --- a/combat_ui.cpp +++ b/combat_ui.cpp @@ -23,14 +23,12 @@ namespace gui { for(auto& [name, cell] : $gui.cells()) { if(name.starts_with("button_")) { auto button = $gui.entity(name); - world.set(button, cell); world.set(button, {}); world.set(button, guecs::make_action(*$level.world, Events::GUI::ATTACK)); world.set