Finally unified all of my events into one place.
This commit is contained in:
parent
6c34fea64a
commit
c618a4828f
30 changed files with 215 additions and 216 deletions
|
|
@ -16,7 +16,7 @@ namespace gui {
|
|||
|
||||
guecs::Entity CombatUI::make_button(
|
||||
guecs::Entity button,
|
||||
Events::GUI event,
|
||||
game::Event event,
|
||||
int action,
|
||||
const std::string &icon_name,
|
||||
const std::string &sound,
|
||||
|
|
@ -62,15 +62,15 @@ namespace gui {
|
|||
|
||||
switch(ritual.element) {
|
||||
case FIRE:
|
||||
make_button(button, Events::GUI::ATTACK,
|
||||
make_button(button, game::Event::ATTACK,
|
||||
slot, "broken_yoyo", "fireball_01", "flame");
|
||||
break;
|
||||
case LIGHTNING:
|
||||
make_button(button, Events::GUI::ATTACK,
|
||||
make_button(button, game::Event::ATTACK,
|
||||
slot, "pocket_watch", "electric_shock_01", "lightning");
|
||||
break;
|
||||
default:
|
||||
make_button(button, Events::GUI::ATTACK,
|
||||
make_button(button, game::Event::ATTACK,
|
||||
slot, "severed_finger", "punch_cartoony", "ui_shader");
|
||||
}
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ namespace gui {
|
|||
auto hp_gauge = $gui.entity("hp_gauge");
|
||||
$gui.set<Sprite>(hp_gauge, {"stone_doll_cursed"});
|
||||
$gui.set<Clickable>(hp_gauge,
|
||||
guecs::make_action(hp_gauge, Events::GUI::HP_STATUS, {}));
|
||||
guecs::make_action(hp_gauge, game::Event::HP_STATUS, {}));
|
||||
}
|
||||
|
||||
$gui.init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue