Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/CGUIText.cpp
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | CGUIText::CGUIText(const CGUI& pGUI, const CGUIString& string, const CStrW& FontW, const float Width, const float BufferZone, const IGUIObject* pObject) | ||||
int pos_last_img = -1; // Position in the string where last img (either left or right) were encountered. | int pos_last_img = -1; // Position in the string where last img (either left or right) were encountered. | ||||
// in order to avoid duplicate processing. | // in order to avoid duplicate processing. | ||||
// get the alignment type for the control we are computing the text for since | // get the alignment type for the control we are computing the text for since | ||||
// we are computing the horizontal alignment in this method in order to not have | // we are computing the horizontal alignment in this method in order to not have | ||||
// to run through the TextCalls a second time in the CalculateTextPosition method again | // to run through the TextCalls a second time in the CalculateTextPosition method again | ||||
EAlign align = EAlign_Left; | EAlign align = EAlign_Left; | ||||
if (pObject->SettingExists("text_align")) | if (pObject->SettingExists("text_align")) | ||||
align = GUI<EAlign>::GetSetting(pObject, "text_align"); | align = pObject->GetSetting<EAlign>("text_align"); | ||||
// Go through string word by word | // Go through string word by word | ||||
for (int i = 0; i < static_cast<int>(string.m_Words.size()) - 1; ++i) | for (int i = 0; i < static_cast<int>(string.m_Words.size()) - 1; ++i) | ||||
{ | { | ||||
// Pre-process each line one time, so we know which floating images | // Pre-process each line one time, so we know which floating images | ||||
// will be added for that line. | // will be added for that line. | ||||
// Generated stuff is stored in Feedback. | // Generated stuff is stored in Feedback. | ||||
▲ Show 20 Lines • Show All 378 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator