Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CTooltip.h
Show All 12 Lines | |||||
* | * | ||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_CTOOLTIP | #ifndef INCLUDED_CTOOLTIP | ||||
#define INCLUDED_CTOOLTIP | #define INCLUDED_CTOOLTIP | ||||
#include "IGUITextOwner.h" | #include "gui/IGUITextOwner.h" | ||||
#include "gui/CGUISprite.h" | |||||
#include "gui/CGUIString.h" | |||||
/** | /** | ||||
* Dynamic tooltips. Similar to CText. | * Dynamic tooltips. Similar to CText. | ||||
*/ | */ | ||||
class CTooltip : public IGUITextOwner | class CTooltip : public IGUITextOwner | ||||
{ | { | ||||
GUI_OBJECT(CTooltip) | GUI_OBJECT(CTooltip) | ||||
public: | public: | ||||
CTooltip(CGUI& pGUI); | CTooltip(CGUI& pGUI); | ||||
virtual ~CTooltip(); | virtual ~CTooltip(); | ||||
protected: | protected: | ||||
void SetupText(); | void SetupText(); | ||||
/** | /** | ||||
* @see IGUIObject#HandleMessage() | * @see IGUIObject#HandleMessage() | ||||
*/ | */ | ||||
virtual void HandleMessage(SGUIMessage& Message); | virtual void HandleMessage(SGUIMessage& Message); | ||||
virtual void Draw(); | virtual void Draw(); | ||||
// Settings | |||||
float m_BufferZone; | |||||
CGUIString m_Caption; | |||||
CStrW m_Font; | |||||
CGUISpriteInstance m_Sprite; | |||||
i32 m_Delay; | |||||
CGUIColor m_TextColor; | |||||
float m_MaxWidth; | |||||
CPos m_Offset; | |||||
EVAlign m_Anchor; | |||||
EAlign m_TextAlign; | |||||
bool m_Independent; | |||||
CPos m_MousePos; | |||||
CStr m_UseObject; | |||||
bool m_HideObject; | |||||
}; | }; | ||||
#endif // INCLUDED_CTOOLTIP | #endif // INCLUDED_CTOOLTIP |
Wildfire Games · Phabricator