The new scene system brought over and updated animation to be optional in the scene engine.

This commit is contained in:
Zed A. Shaw 2026-05-26 12:48:34 -04:00
parent d86617aa3a
commit e7b6b42698
13 changed files with 194 additions and 38 deletions

View file

@ -1,18 +1,22 @@
#include "gui/guecstra.hpp"
#include "game/level.hpp"
#include <magic_enum/magic_enum.hpp>
#include "dbc.hpp"
namespace guecs {
Clickable make_action(guecs::Entity gui_id, game::Event event) {
return {[&, gui_id, event](auto){
Clickable make_action(guecs::Entity gui_id, game::Event event, const std::source_location location) {
return {[&, gui_id, event, location](guecs::Modifiers mods){
auto world = GameDB::current_world();
dbc::log($F("SENDING EVENT: {}: {}", magic_enum::enum_name(event), mods.to_string()), location);
world->send<game::Event>(event, gui_id, {});
}};
}
Clickable make_action(guecs::Entity gui_id, game::Event event, std::any data) {
return {[&, event, data](auto){
Clickable make_action(guecs::Entity gui_id, game::Event event, std::any data, const std::source_location location) {
return {[&, event, data, location](auto){
auto world = GameDB::current_world();
dbc::log($F("SENDING EVENT: {}", magic_enum::enum_name(event)), location);
world->send<game::Event>(event, gui_id, data);
}};
}