Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectBases/IGUITextOwner.h
Show All 24 Lines | --Overview-- | ||||
and many controls that will use CGUIStrings might | and many controls that will use CGUIStrings might | ||||
not use this, but does help for regular usage such | not use this, but does help for regular usage such | ||||
as a text-box, a button, a radio button etc. | as a text-box, a button, a radio button etc. | ||||
*/ | */ | ||||
#ifndef INCLUDED_IGUITEXTOWNER | #ifndef INCLUDED_IGUITEXTOWNER | ||||
#define INCLUDED_IGUITEXTOWNER | #define INCLUDED_IGUITEXTOWNER | ||||
#include "gui/CGUISetting.h" | |||||
#include "gui/SettingTypes/EAlign.h" | |||||
#include "maths/Rect.h" | #include "maths/Rect.h" | ||||
#include <vector> | #include <vector> | ||||
struct CGUIColor; | struct CGUIColor; | ||||
struct SGUIMessage; | struct SGUIMessage; | ||||
class CGUIText; | class CGUIText; | ||||
class CGUIString; | class CGUIString; | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | protected: | ||||
*/ | */ | ||||
std::vector<CGUIText> m_GeneratedTexts; | std::vector<CGUIText> m_GeneratedTexts; | ||||
/** | /** | ||||
* Calculate the position for the text, based on the alignment. | * Calculate the position for the text, based on the alignment. | ||||
*/ | */ | ||||
void CalculateTextPosition(CRect& ObjSize, CVector2D& TextPos, CGUIText& Text); | void CalculateTextPosition(CRect& ObjSize, CVector2D& TextPos, CGUIText& Text); | ||||
CGUISimpleSetting<EAlign> m_TextAlign; | |||||
CGUISimpleSetting<EVAlign> m_TextVAlign; | |||||
private: | private: | ||||
/** | /** | ||||
* Reference to the IGUIObject. | * Reference to the IGUIObject. | ||||
* Private, because we don't want to inherit it in multiple classes. | * Private, because we don't want to inherit it in multiple classes. | ||||
*/ | */ | ||||
IGUIObject& m_pObject; | IGUIObject& m_pObject; | ||||
}; | }; | ||||
#endif // INCLUDED_IGUITEXTOWNER | #endif // INCLUDED_IGUITEXTOWNER |
Wildfire Games · Phabricator