22 #include "precompiled.h"
43 AddSetting(GUIST_CGUISpriteInstance,
"sprite");
44 AddSetting(GUIST_CGUISpriteInstance,
"sprite_over");
45 AddSetting(GUIST_CGUISpriteInstance,
"sprite_pressed");
46 AddSetting(GUIST_CGUISpriteInstance,
"sprite_disabled");
52 AddSetting(GUIST_CColor,
"textcolor_disabled");
80 float buffer_zone=0.f;
103 static CStr strSprite(
"sprite");
104 static CStr strSpriteOver(
"sprite_over");
105 static CStr strSpritePressed(
"sprite_pressed");
106 static CStr strSpriteDisabled(
"sprite_disabled");
107 static CStr strCellId(
"cell_id");
const PSRETURN PSRETURN_OK
static PSRETURN GetSetting(const IGUIObject *pObject, const CStr &Setting, T &Value)
Retrieves a setting by name from object pointer.
virtual float GetBufferedZ() const
Returns not the Z value, but the actual buffered Z value, i.e.
void CalculateTextPosition(CRect &ObjSize, CPos &TextPos, SGUIText &Text)
Calculate the position for the text, based on the alignment.
Includes static functions that needs one template argument.
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
virtual void HandleMessage(SGUIMessage &Message)
void AddSetting(const EGUISettingType &Type, const CStr &Name)
Add a setting to m_Settings.
CRect m_CachedActualSize
Cached size, real size m_Size is actually dependent on resolution and can have different real outcome...
virtual void DrawText(int index, const CColor &color, const CPos &pos, float z, const CRect &clipping=CRect())
Draws the Text.
std::vector< SGUIText * > m_GeneratedTexts
Texts that are generated and ready to be rendered.
Message send to IGUIObject::HandleMessage() in order to give life to Objects manually with a derived ...
void AddText(SGUIText *text)
Adds a text object.
String class, substitute for CStr, but that parses the tags and builds up a list of all text that wil...
SGUIText GenerateText(const CGUIString &Text, const CStrW &Font, const float &Width, const float &BufferZone, const IGUIObject *pObject=NULL)
Generate a SGUIText object from the inputted string.
static PSRETURN GetSettingPointer(const IGUIObject *pObject, const CStr &Setting, T *&Value)
An SGUIText object is a parsed string, divided into text-rendering components.