Move the guecstra stuff into the gui.
This commit is contained in:
parent
dfc6aa08e9
commit
cc44c9d37a
5 changed files with 13 additions and 13 deletions
|
@ -2,7 +2,7 @@
|
|||
#include "constants.hpp"
|
||||
#include "rituals.hpp"
|
||||
#include <fmt/xchar.h>
|
||||
#include "guecstra.hpp"
|
||||
#include "gui/guecstra.hpp"
|
||||
|
||||
namespace gui {
|
||||
using namespace guecs;
|
||||
|
|
18
gui/guecstra.cpp
Normal file
18
gui/guecstra.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "gui/guecstra.hpp"
|
||||
|
||||
namespace guecs {
|
||||
|
||||
Clickable make_action(DinkyECS::World& target, Events::GUI event) {
|
||||
return {[&, event](auto ent, auto data){
|
||||
// remember that ent is passed in from the UI::mouse handler
|
||||
target.send<Events::GUI>(event, ent, data);
|
||||
}};
|
||||
}
|
||||
|
||||
Clickable make_action(DinkyECS::World& target, Events::GUI event, std::any data) {
|
||||
return {[&, event, data](auto ent, auto){
|
||||
// remember that ent is passed in from the UI::mouse handler
|
||||
target.send<Events::GUI>(event, ent, data);
|
||||
}};
|
||||
}
|
||||
}
|
8
gui/guecstra.hpp
Normal file
8
gui/guecstra.hpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "components.hpp"
|
||||
#include "events.hpp"
|
||||
#include <guecs/ui.hpp>
|
||||
|
||||
namespace guecs {
|
||||
Clickable make_action(DinkyECS::World& target, Events::GUI event);
|
||||
Clickable make_action(DinkyECS::World& target, Events::GUI event, std::any data);
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
#include "gui/loot_ui.hpp"
|
||||
#include "constants.hpp"
|
||||
#include <fmt/xchar.h>
|
||||
#include "guecstra.hpp"
|
||||
#include "gui/guecstra.hpp"
|
||||
|
||||
namespace gui {
|
||||
using namespace guecs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue