#ifndef GUIOverlayManager_h__ #define GUIOverlayManager_h__ #include #include #include #include "GUIOverlay.h" #include 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 OverlayCollection; typedef std::map::iterator OverlayCollectionIt; OverlayCollection overlays; GUIOverlay* FindOverlay(const String& name); uint32 scr_width; uint32 scr_height; uint32 cur_x, cur_y; }; } #endif // GUIOverlayManager_h__