This commit is contained in:
2025-09-05 22:56:48 +03:00
parent 25816c5658
commit 92ec3e9497
17 changed files with 1320 additions and 453 deletions

30
src/gamedata/GUIModule.h Normal file
View 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