Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/ObjectTypes/CTooltip.cpp
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | void CTooltip::Draw() | ||||
// Normally IGUITextOwner will handle this updating but since SetupText can modify the position | // Normally IGUITextOwner will handle this updating but since SetupText can modify the position | ||||
// we need to call it now *before* we do the rest of the drawing | // we need to call it now *before* we do the rest of the drawing | ||||
if (!m_GeneratedTextsValid) | if (!m_GeneratedTextsValid) | ||||
{ | { | ||||
SetupText(); | SetupText(); | ||||
m_GeneratedTextsValid = true; | m_GeneratedTextsValid = true; | ||||
} | } | ||||
const float z = GetBufferedZ(); | m_pGUI.DrawSprite(m_Sprite, m_CachedActualSize); | ||||
m_pGUI.DrawSprite(m_Sprite, z, m_CachedActualSize); | DrawText(0, m_TextColor, m_CachedActualSize.TopLeft()); | ||||
DrawText(0, m_TextColor, m_CachedActualSize.TopLeft(), z + 0.1f); | |||||
} | } | ||||
float CTooltip::GetBufferedZ() const | float CTooltip::GetBufferedZ() const | ||||
{ | { | ||||
// TODO: Find a nicer way of putting the tooltip on top of everything else. | // TODO: Find a nicer way of putting the tooltip on top of everything else. | ||||
return 900.f; | return 900.f; | ||||
} | } |
Wildfire Games · Phabricator