All of the UIs should be cleared out, and that just leaves the tests.

This commit is contained in:
Zed A. Shaw 2025-08-19 23:58:42 -04:00
parent d5ff57e025
commit 564f9842a2
23 changed files with 126 additions and 145 deletions

View file

@ -1,16 +1,19 @@
#include "gui/guecstra.hpp"
#include "game_level.hpp"
namespace guecs {
Clickable make_action(GameLevel& target, guecs::Entity gui_id, Events::GUI event) {
Clickable make_action(guecs::Entity gui_id, Events::GUI event) {
return {[&, gui_id, event](auto){
target.world->send<Events::GUI>(event, gui_id, {});
auto world = Game::current_world();
world->send<Events::GUI>(event, gui_id, {});
}};
}
Clickable make_action(GameLevel& target, guecs::Entity gui_id, Events::GUI event, std::any data) {
Clickable make_action(guecs::Entity gui_id, Events::GUI event, std::any data) {
return {[&, event, data](auto){
target.world->send<Events::GUI>(event, gui_id, data);
auto world = Game::current_world();
world->send<Events::GUI>(event, gui_id, data);
}};
}