Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/CCheckBox.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
CCheckBox::~CCheckBox() | CCheckBox::~CCheckBox() | ||||
{ | { | ||||
} | } | ||||
void CCheckBox::SetupText() | void CCheckBox::SetupText() | ||||
{ | { | ||||
ENSURE(m_GeneratedTexts.size() == 1); | ENSURE(m_GeneratedTexts.size() == 1); | ||||
CStrW font; | |||||
if (GUI<CStrW>::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) | |||||
// Use the default if none is specified | |||||
// TODO Gee: (2004-08-14) Default should not be hard-coded, but be in styles! | |||||
font = L"default"; | |||||
float square_side; | float square_side; | ||||
GUI<float>::GetSetting(this, "square_side", square_side); | GUI<float>::GetSetting(this, "square_side", square_side); | ||||
const CGUIString& caption = GUI<CGUIString>::GetSetting(this, "caption"); | const CGUIString& caption = GUI<CGUIString>::GetSetting(this, "caption"); | ||||
const CStrW& font = GUI<CStrW>::GetSetting(this, "font"); | |||||
float buffer_zone = 0.f; | float buffer_zone = 0.f; | ||||
GUI<float>::GetSetting(this, "buffer_zone", buffer_zone); | GUI<float>::GetSetting(this, "buffer_zone", buffer_zone); | ||||
m_GeneratedTexts[0] = CGUIText(m_pGUI, caption, font, m_CachedActualSize.GetWidth() - square_side, 0.f, this); | m_GeneratedTexts[0] = CGUIText(m_pGUI, caption, font, m_CachedActualSize.GetWidth() - square_side, 0.f, this); | ||||
} | } | ||||
void CCheckBox::HandleMessage(SGUIMessage& Message) | void CCheckBox::HandleMessage(SGUIMessage& Message) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator