From 18380eb2e6443c2736b4958b01e7ba2fe2cfa318 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 28 Apr 2017 15:28:18 -0400 Subject: ui menu fix --- include/ui_menu.hpp | 12 ++++++++++++ include/world.hpp | 2 ++ 2 files changed, 14 insertions(+) (limited to 'include') diff --git a/include/ui_menu.hpp b/include/ui_menu.hpp index 5288161..cf7ffd6 100644 --- a/include/ui_menu.hpp +++ b/include/ui_menu.hpp @@ -53,6 +53,18 @@ public: void gotoParent(void); }; +class SDLReceiver : public entityx::System, public entityx::Receiver +{ +public: + static bool clicked; + + void configure(entityx::EventManager& ev) + { ev.subscribe(*this); } + void receive(const MainSDLEvent& mse); + void update(entityx::EntityManager& en, entityx::EventManager& ev, entityx::TimeDelta dt) override + { (void)en, (void)ev, (void)dt; } +}; + namespace ui { namespace menu { menuItem createButton(vec2 l, dim2 d, Color c, const char* t, MenuAction f); diff --git a/include/world.hpp b/include/world.hpp index 163676d..2af4642 100644 --- a/include/world.hpp +++ b/include/world.hpp @@ -176,6 +176,8 @@ public: static void load(const std::string& file); void fight(entityx::Entity entity); + + void die(void); }; #endif // WORLD_HPP_ -- cgit v1.2.3