Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/COList.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | void COList::SetupText() | ||||
const CGUIList& pList = GUI<CGUIList>::GetSetting(this, "list"); | const CGUIList& pList = GUI<CGUIList>::GetSetting(this, "list"); | ||||
m_ItemsYPositions.resize(pList.m_Items.size() + 1); | m_ItemsYPositions.resize(pList.m_Items.size() + 1); | ||||
// Delete all generated texts. Some could probably be saved, | // Delete all generated texts. Some could probably be saved, | ||||
// but this is easier, and this function will never be called | // but this is easier, and this function will never be called | ||||
// continuously, or even often, so it'll probably be okay. | // continuously, or even often, so it'll probably be okay. | ||||
m_GeneratedTexts.clear(); | m_GeneratedTexts.clear(); | ||||
CStrW font; | const CStrW& font = GUI<CStrW>::GetSetting(this, "font"); | ||||
if (GUI<CStrW>::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) | |||||
// Use the default if none is specified | |||||
// TODO Gee: (2004-08-14) Don't define standard like this. Do it with the default style. | |||||
font = L"default"; | |||||
bool scrollbar; | bool scrollbar; | ||||
GUI<bool>::GetSetting(this, "scrollbar", scrollbar); | GUI<bool>::GetSetting(this, "scrollbar", scrollbar); | ||||
m_TotalAvailableColumnWidth = GetListRect().GetWidth(); | m_TotalAvailableColumnWidth = GetListRect().GetWidth(); | ||||
// remove scrollbar if applicable | // remove scrollbar if applicable | ||||
if (scrollbar && GetScrollBar(0).GetStyle()) | if (scrollbar && GetScrollBar(0).GetStyle()) | ||||
m_TotalAvailableColumnWidth -= GetScrollBar(0).GetStyle()->m_Width; | m_TotalAvailableColumnWidth -= GetScrollBar(0).GetStyle()->m_Width; | ||||
▲ Show 20 Lines • Show All 403 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator