Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CText.cpp
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | if (scrollbar) | ||||
cliparea.left < GetScrollBar(0).GetOuterRect().right) | cliparea.left < GetScrollBar(0).GetOuterRect().right) | ||||
cliparea.left = GetScrollBar(0).GetOuterRect().right; | cliparea.left = GetScrollBar(0).GetOuterRect().right; | ||||
} | } | ||||
} | } | ||||
bool enabled; | bool enabled; | ||||
GUI<bool>::GetSetting(this, "enabled", enabled); | GUI<bool>::GetSetting(this, "enabled", enabled); | ||||
CGUIColor color; | const CGUIColor& color = GUI<CGUIColor>::GetSetting(this, enabled ? "textcolor" : "textcolor_disabled"); | ||||
GUI<CGUIColor>::GetSetting(this, enabled ? "textcolor" : "textcolor_disabled", color); | |||||
if (scrollbar) | if (scrollbar) | ||||
DrawText(0, color, m_CachedActualSize.TopLeft() - CPos(0.f, scroll), bz+0.1f, cliparea); | DrawText(0, color, m_CachedActualSize.TopLeft() - CPos(0.f, scroll), bz + 0.1f, cliparea); | ||||
else | else | ||||
DrawText(0, color, m_TextPos, bz+0.1f, cliparea); | DrawText(0, color, m_TextPos, bz + 0.1f, cliparea); | ||||
} | } | ||||
bool CText::MouseOverIcon() | bool CText::MouseOverIcon() | ||||
{ | { | ||||
for (const CGUIText& guitext : m_GeneratedTexts) | for (const CGUIText& guitext : m_GeneratedTexts) | ||||
for (const CGUIText::SSpriteCall& spritecall : guitext.GetSpriteCalls()) | for (const CGUIText::SSpriteCall& spritecall : guitext.GetSpriteCalls()) | ||||
{ | { | ||||
// Check mouse over sprite | // Check mouse over sprite | ||||
Show All 15 Lines |
Wildfire Games · Phabricator