Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/CTooltip.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
CTooltip::~CTooltip() | CTooltip::~CTooltip() | ||||
{ | { | ||||
} | } | ||||
void CTooltip::SetupText() | void CTooltip::SetupText() | ||||
{ | { | ||||
ENSURE(m_GeneratedTexts.size() == 1); | ENSURE(m_GeneratedTexts.size() == 1); | ||||
CStrW font; | |||||
if (GUI<CStrW>::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) | |||||
font = L"default"; | |||||
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); | ||||
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 max_width = 0.f; | float max_width = 0.f; | ||||
GUI<float>::GetSetting(this, "maxwidth", max_width); | GUI<float>::GetSetting(this, "maxwidth", max_width); | ||||
m_GeneratedTexts[0] = CGUIText(m_pGUI, caption, font, max_width, buffer_zone, this); | m_GeneratedTexts[0] = CGUIText(m_pGUI, caption, font, max_width, buffer_zone, this); | ||||
// Position the tooltip relative to the mouse: | // Position the tooltip relative to the mouse: | ||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator