Files
LifeProject/LifeGUI/src/GUIOverlayManager.h
T

39 lines
1.2 KiB
C++
Raw Normal View History

2025-05-13 02:46:21 +03:00
#ifndef GUIOverlayManager_h__
#define GUIOverlayManager_h__
#include <LString.h>
#include <IInputSystem.h>
#include <map>
#include "GUIOverlay.h"
#include <Types.h>
namespace LifeGUI
{
class GUIOverlayManager
{
public:
GUIOverlayManager();
bool KeyDown( LifeCore::KeyCodes::Key key, unsigned int text, const String& str );
bool KeyUp( LifeCore::KeyCodes::Key key, unsigned int text, const std::string& str );
bool MouseMove( int absX, int relX, int absY, int relY);
bool MousePressed( LifeCore::KeyCodes::Key button);
bool MouseReleased( LifeCore::KeyCodes::Key button);
GUIOverlay* GetOverlay();
GUIOverlay* GetOverlay(const String& name, bool create = false);
void SetSize(uint32 width, uint32 height);
bool SwitchOverlay(const String& name);
void Render();
private:
GUIOverlay* selected_ovrl;
typedef std::map<String, GUIOverlay*> OverlayCollection;
typedef std::map<String, GUIOverlay*>::iterator OverlayCollectionIt;
OverlayCollection overlays;
GUIOverlay* FindOverlay(const String& name);
uint32 scr_width;
uint32 scr_height;
uint32 cur_x, cur_y;
};
}
#endif // GUIOverlayManager_h__