Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CCheckBox.cpp
Show All 25 Lines | |||||
/** | /** | ||||
* TODO: Since there is no call to DrawText, the checkbox won't render any text. | * TODO: Since there is no call to DrawText, the checkbox won't render any text. | ||||
* Thus the font, caption, textcolor and other settings have no effect. | * Thus the font, caption, textcolor and other settings have no effect. | ||||
*/ | */ | ||||
CCheckBox::CCheckBox(CGUI* pGUI) | CCheckBox::CCheckBox(CGUI* pGUI) | ||||
: IGUIObject(pGUI), IGUITextOwner(pGUI), IGUIButtonBehavior(pGUI) | : IGUIObject(pGUI), IGUITextOwner(pGUI), IGUIButtonBehavior(pGUI) | ||||
{ | { | ||||
AddText(new SGUIText()); | |||||
} | |||||
CCheckBox::~CCheckBox() | |||||
{ | |||||
} | |||||
void CCheckBox::AddSettings() | |||||
{ | |||||
AddSetting(GUIST_float, "buffer_zone"); | AddSetting(GUIST_float, "buffer_zone"); | ||||
AddSetting(GUIST_CGUIString, "caption"); | AddSetting(GUIST_CGUIString, "caption"); | ||||
AddSetting(GUIST_int, "cell_id"); | AddSetting(GUIST_int, "cell_id"); | ||||
AddSetting(GUIST_bool, "checked"); | AddSetting(GUIST_bool, "checked"); | ||||
AddSetting(GUIST_CStrW, "font"); | AddSetting(GUIST_CStrW, "font"); | ||||
AddSetting(GUIST_CStrW, "sound_disabled"); | AddSetting(GUIST_CStrW, "sound_disabled"); | ||||
AddSetting(GUIST_CStrW, "sound_enter"); | AddSetting(GUIST_CStrW, "sound_enter"); | ||||
AddSetting(GUIST_CStrW, "sound_leave"); | AddSetting(GUIST_CStrW, "sound_leave"); | ||||
Show All 10 Lines | void CCheckBox::AddSettings() | ||||
AddSetting(GUIST_float, "square_side"); | AddSetting(GUIST_float, "square_side"); | ||||
AddSetting(GUIST_CGUIColor, "textcolor"); | AddSetting(GUIST_CGUIColor, "textcolor"); | ||||
AddSetting(GUIST_CGUIColor, "textcolor_over"); | AddSetting(GUIST_CGUIColor, "textcolor_over"); | ||||
AddSetting(GUIST_CGUIColor, "textcolor_pressed"); | AddSetting(GUIST_CGUIColor, "textcolor_pressed"); | ||||
AddSetting(GUIST_CGUIColor, "textcolor_disabled"); | AddSetting(GUIST_CGUIColor, "textcolor_disabled"); | ||||
AddSetting(GUIST_CStrW, "tooltip"); | AddSetting(GUIST_CStrW, "tooltip"); | ||||
AddSetting(GUIST_CStr, "tooltip_style"); | AddSetting(GUIST_CStr, "tooltip_style"); | ||||
AddText(new SGUIText()); | IGUIObject::AddSettings(); | ||||
} | |||||
CCheckBox::~CCheckBox() | |||||
{ | |||||
} | } | ||||
void CCheckBox::SetupText() | void CCheckBox::SetupText() | ||||
{ | { | ||||
if (!GetGUI()) | if (!GetGUI()) | ||||
return; | return; | ||||
ENSURE(m_GeneratedTexts.size() == 1); | ENSURE(m_GeneratedTexts.size() == 1); | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator