/*! * \file include/UI.h * \brief Abstract UI interface * * \author xythobuz */ #ifndef _UI_H_ #define _UI_H_ #include #include #include #include #include "imgui/imgui.h" class UI { public: static int initialize(); static void eventsFinished(); static void display(); static void shutdown(); static void setVisible(bool v); static bool isVisible(); static void handleKeyboard(KeyboardButton key, bool pressed); static void handleText(char* text, bool notFinished); static void handleMouseClick(unsigned int x, unsigned int y, KeyboardButton button, bool released); static void handleMouseMotion(int xrel, int yrel, int xabs, int yabs); static void handleMouseScroll(int xrel, int yrel); static void handleControllerAxis(float value, KeyboardButton axis); static void handleControllerButton(KeyboardButton button, bool released); static void renderImGui(ImDrawList** const draw_lists, int count); private: static bool visible; static unsigned int fontTex; static std::string iniFilename; static std::string logFilename; static bool metaKeyIsActive; static std::list> keyboardEvents; static std::list> clickEvents; static std::list> motionEvents; static std::list> scrollEvents; }; #endif