Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CGUIText.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | void SGenerateTextImage::SetupSpriteCall( | ||||
SpriteCall.m_CellID = CellID; | SpriteCall.m_CellID = CellID; | ||||
SpriteCall.m_Sprite = TextureName; | SpriteCall.m_Sprite = TextureName; | ||||
m_YFrom = SpriteCall.m_Area.top - BufferZone; | m_YFrom = SpriteCall.m_Area.top - BufferZone; | ||||
m_YTo = SpriteCall.m_Area.bottom + BufferZone; | m_YTo = SpriteCall.m_Area.bottom + BufferZone; | ||||
m_Indentation = Size.cx + BufferZone * 2; | m_Indentation = Size.cx + BufferZone * 2; | ||||
} | } | ||||
CGUIText::CGUIText(const CGUI& pGUI, const CGUIString& string, const CStrW& FontW, const float Width, const float BufferZone, const IGUIObject* pObject) | CGUIText::CGUIText(const CGUI& pGUI, const CGUIString& string, const CStrIntern& Font, const float Width, const float BufferZone, const IGUIObject* pObject) | ||||
{ | { | ||||
if (string.m_Words.empty()) | if (string.m_Words.empty()) | ||||
return; | return; | ||||
CStrIntern Font(FontW.ToUTF8()); | |||||
float x = BufferZone, y = BufferZone; // drawing pointer | float x = BufferZone, y = BufferZone; // drawing pointer | ||||
int from = 0; | int from = 0; | ||||
bool FirstLine = true; // Necessary because text in the first line is shorter | bool FirstLine = true; // Necessary because text in the first line is shorter | ||||
// (it doesn't count the line spacing) | // (it doesn't count the line spacing) | ||||
// Images on the left or the right side. | // Images on the left or the right side. | ||||
SGenerateTextImages Images; | SGenerateTextImages Images; | ||||
▲ Show 20 Lines • Show All 395 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator