| 895 | ////////////////////////////////////////////////////////////////////////// |
| 896 | |
| 897 | bool CUIXmlInit::InitFrameLine(CUIXml& xml_doc, const char* path, int index, CUIFrameLineWnd* pWnd) |
| 898 | { |
| 899 | R_ASSERT2(xml_doc.NavigateToNode(path, index), "XML node not found"); |
| 900 | |
| 901 | string256 buf; |
| 902 | |
| 903 | float x = xml_doc.ReadAttribFlt(path, index, "x"); |
| 904 | float y = xml_doc.ReadAttribFlt(path, index, "y"); |
| 905 | |
| 906 | InitAlignment(xml_doc, path, index, x, y, pWnd); |
| 907 | |
| 908 | float width = xml_doc.ReadAttribFlt(path, index, "width"); |
| 909 | float height = xml_doc.ReadAttribFlt(path, index, "height"); |
| 910 | bool vertical = !!xml_doc.ReadAttribInt(path, index, "vertical"); |
| 911 | |
| 912 | strconcat(sizeof(buf), buf, path, ":texture"); |
| 913 | shared_str base_name = xml_doc.Read(buf, index, NULL); |
| 914 | |
| 915 | VERIFY(base_name); |
| 916 | /* { |
| 917 | pWnd->Init(x, y, width, height); |
| 918 | return true; |
| 919 | } |
| 920 | */ |
| 921 | u32 color = GetColor(xml_doc, buf, index, 0xff); |
| 922 | pWnd->SetColor(color); |
| 923 | |
| 924 | pWnd->Init(*base_name, x, y, width, height, !vertical); |
| 925 | |
| 926 | strconcat(sizeof(buf), buf, path, ":title"); |
| 927 | if (xml_doc.NavigateToNode(buf, index)) |
| 928 | InitStatic(xml_doc, buf, index, &pWnd->UITitleText); |
| 929 | |
| 930 | return true; |
| 931 | } |
| 932 | |
| 933 | bool CUIXmlInit::InitLabel(CUIXml& xml_doc, const char* path, int index, CUILabel* pWnd) |
| 934 | { |
no test coverage detected