| 1429 | } |
| 1430 | |
| 1431 | bool CUIXmlInit::InitListBox(CUIXml& xml_doc, const char* path, int index, CUIListBox* pWnd) |
| 1432 | { |
| 1433 | InitScrollView(xml_doc, path, index, pWnd); |
| 1434 | |
| 1435 | //. bool b = (1==xml_doc.ReadAttribInt(path, index, "multiselect",0)); |
| 1436 | //. pWnd->m_flags.set (CUIScrollView::eMultiSelect, b); |
| 1437 | |
| 1438 | char _path[512]; |
| 1439 | |
| 1440 | u32 t_color; |
| 1441 | CGameFont* pFnt; |
| 1442 | strconcat(sizeof(_path), _path, path, ":font"); |
| 1443 | InitFont(xml_doc, _path, index, t_color, pFnt); |
| 1444 | |
| 1445 | pWnd->SetTextColor(t_color); |
| 1446 | pWnd->SetFont(pFnt); |
| 1447 | |
| 1448 | strconcat(sizeof(_path), _path, path, ":font_s"); |
| 1449 | t_color = GetColor(xml_doc, _path, index, 0x00); |
| 1450 | pWnd->SetTextColorS(t_color); |
| 1451 | |
| 1452 | // Load font alignment |
| 1453 | shared_str al = xml_doc.ReadAttrib(_path, index, "align"); |
| 1454 | if (0 == xr_strcmp(al, "c")) |
| 1455 | pWnd->SetTextAlignment(CGameFont::alCenter); |
| 1456 | |
| 1457 | else if (0 == xr_strcmp(al, "r")) |
| 1458 | pWnd->SetTextAlignment(CGameFont::alRight); |
| 1459 | |
| 1460 | else if (0 == xr_strcmp(al, "l")) |
| 1461 | pWnd->SetTextAlignment(CGameFont::alLeft); |
| 1462 | |
| 1463 | return true; |
| 1464 | } |
| 1465 | |
| 1466 | bool CUIXmlInit::InitTrackBar(CUIXml& xml_doc, const char* path, int index, CUITrackBar* pWnd) |
| 1467 | { |
nothing calls this directly
no test coverage detected