Updates
This commit is contained in:
30
src/gamedata/GUIModule.h
Normal file
30
src/gamedata/GUIModule.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef GUI_MODULE_H_
|
||||
#define GUI_MODULE_H_
|
||||
#include <flecs.h>
|
||||
namespace OgreBites
|
||||
{
|
||||
class InputListener;
|
||||
}
|
||||
namespace ECS
|
||||
{
|
||||
struct GUI {
|
||||
bool enabled;
|
||||
bool grab;
|
||||
bool grabChanged;
|
||||
OgreBites::InputListener *mGuiInpitListener;
|
||||
static void setWindowGrab(bool g = true)
|
||||
{
|
||||
ECS::GUI &gui = ECS::get().get_mut<ECS::GUI>();
|
||||
if (gui.grab != g) {
|
||||
gui.grab = g;
|
||||
gui.grabChanged = true;
|
||||
ECS::get().modified<ECS::GUI>();
|
||||
}
|
||||
}
|
||||
};
|
||||
struct GUIModule {
|
||||
flecs::entity ui_wait;
|
||||
GUIModule(flecs::world &ecs);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user