Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectTypes/CTooltip.h
Show All 29 Lines | |||||
class CTooltip : public IGUIObject, public IGUITextOwner | class CTooltip : public IGUIObject, public IGUITextOwner | ||||
{ | { | ||||
GUI_OBJECT(CTooltip) | GUI_OBJECT(CTooltip) | ||||
public: | public: | ||||
CTooltip(CGUI& pGUI); | CTooltip(CGUI& pGUI); | ||||
virtual ~CTooltip(); | virtual ~CTooltip(); | ||||
const CStr& GetUsedObject() const { return m_UseObject; } | |||||
i32 GetTooltipDelay() const { return m_Delay; } | |||||
bool ShouldHideObject() const { return m_HideObject; } | |||||
void SetMousePos(const CVector2D& vec) { m_MousePos.Set(vec, true); } | |||||
protected: | protected: | ||||
void SetupText(); | void SetupText(); | ||||
/** | /** | ||||
* @see IGUIObject#UpdateCachedSize() | * @see IGUIObject#UpdateCachedSize() | ||||
*/ | */ | ||||
void UpdateCachedSize(); | void UpdateCachedSize(); | ||||
/** | /** | ||||
* @see IGUIObject#HandleMessage() | * @see IGUIObject#HandleMessage() | ||||
*/ | */ | ||||
virtual void HandleMessage(SGUIMessage& Message); | virtual void HandleMessage(SGUIMessage& Message); | ||||
virtual void Draw(); | virtual void Draw(); | ||||
virtual float GetBufferedZ() const; | virtual float GetBufferedZ() const; | ||||
// Settings | CGUISimpleSetting<float> m_BufferZone; | ||||
float m_BufferZone; | CGUISimpleSetting<CGUIString> m_Caption; | ||||
CGUIString m_Caption; | CGUISimpleSetting<CStrW> m_Font; | ||||
CStrW m_Font; | CGUISimpleSetting<CGUISpriteInstance> m_Sprite; | ||||
CGUISpriteInstance m_Sprite; | CGUISimpleSetting<i32> m_Delay; | ||||
i32 m_Delay; | CGUISimpleSetting<CGUIColor> m_TextColor; | ||||
CGUIColor m_TextColor; | CGUISimpleSetting<float> m_MaxWidth; | ||||
float m_MaxWidth; | CGUISimpleSetting<CVector2D> m_Offset; | ||||
CVector2D m_Offset; | CGUISimpleSetting<EVAlign> m_Anchor; | ||||
EVAlign m_Anchor; | CGUISimpleSetting<bool> m_Independent; | ||||
EAlign m_TextAlign; | CGUISimpleSetting<CVector2D> m_MousePos; | ||||
bool m_Independent; | CGUISimpleSetting<CStr> m_UseObject; | ||||
CVector2D m_MousePos; | CGUISimpleSetting<bool> m_HideObject; | ||||
CStr m_UseObject; | |||||
bool m_HideObject; | |||||
}; | }; | ||||
#endif // INCLUDED_CTOOLTIP | #endif // INCLUDED_CTOOLTIP |
Wildfire Games · Phabricator