Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CInput.cpp
Show First 20 Lines • Show All 1,179 Lines • ▼ Show 20 Lines | void CInput::Draw() | ||||
CColor color, color_selected; | CColor color, color_selected; | ||||
GUI<CStrW>::GetSetting(this, "font", font_name_w); | GUI<CStrW>::GetSetting(this, "font", font_name_w); | ||||
GUI<CColor>::GetSetting(this, "textcolor", color); | GUI<CColor>::GetSetting(this, "textcolor", color); | ||||
GUI<CColor>::GetSetting(this, "textcolor_selected", color_selected); | GUI<CColor>::GetSetting(this, "textcolor_selected", color_selected); | ||||
CStrIntern font_name(font_name_w.ToUTF8()); | CStrIntern font_name(font_name_w.ToUTF8()); | ||||
// Get pointer of caption, it might be very large, and we don't | // Get pointer of caption, it might be very large, and we don't | ||||
// want to copy it continuously. | // want to copy it continuously. | ||||
CStrW* pCaption = NULL; | CStrW* pCaption = nullptr; | ||||
wchar_t mask_char = L'*'; | wchar_t mask_char = L'*'; | ||||
if (mask) | if (mask) | ||||
{ | { | ||||
CStrW maskStr; | CStrW maskStr; | ||||
GUI<CStrW>::GetSetting(this, "mask_char", maskStr); | GUI<CStrW>::GetSetting(this, "mask_char", maskStr); | ||||
if (maskStr.length() > 0) | if (maskStr.length() > 0) | ||||
mask_char = maskStr[0]; | mask_char = maskStr[0]; | ||||
} | } | ||||
else | else | ||||
pCaption = (CStrW*)m_Settings["caption"].m_pSetting; | pCaption = (CStrW*)m_Settings["caption"].m_pSetting; | ||||
CGUISpriteInstance* sprite = NULL; | CGUISpriteInstance* sprite = nullptr; | ||||
CGUISpriteInstance* sprite_selectarea = NULL; | CGUISpriteInstance* sprite_selectarea = nullptr; | ||||
int cell_id; | int cell_id; | ||||
GUI<CGUISpriteInstance>::GetSettingPointer(this, "sprite", sprite); | GUI<CGUISpriteInstance>::GetSettingPointer(this, "sprite", sprite); | ||||
GUI<CGUISpriteInstance>::GetSettingPointer(this, "sprite_selectarea", sprite_selectarea); | GUI<CGUISpriteInstance>::GetSettingPointer(this, "sprite_selectarea", sprite_selectarea); | ||||
GUI<int>::GetSetting(this, "cell_id", cell_id); | GUI<int>::GetSetting(this, "cell_id", cell_id); | ||||
GetGUI()->DrawSprite(*sprite, cell_id, bz, m_CachedActualSize); | GetGUI()->DrawSprite(*sprite, cell_id, bz, m_CachedActualSize); | ||||
▲ Show 20 Lines • Show All 929 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator