| 123 | ////////////////////////////////////////////////////////////////////////// |
| 124 | |
| 125 | bool CUIXmlInit::InitFrameWindow(CUIXml& xml_doc, LPCSTR path, int index, CUIFrameWindow* pWnd) |
| 126 | { |
| 127 | R_ASSERT3(xml_doc.NavigateToNode(path, index), "XML node not found", path); |
| 128 | |
| 129 | InitWindow(xml_doc, path, index, pWnd); |
| 130 | InitTexture(xml_doc, path, index, pWnd); |
| 131 | |
| 132 | string256 buf; |
| 133 | /* |
| 134 | strconcat(buf,path,":left_top_texture"); |
| 135 | shared_str tex_name = xml_doc.Read(buf, index, NULL); |
| 136 | |
| 137 | float x = xml_doc.ReadAttribFlt(buf, index, "x"); |
| 138 | float y = xml_doc.ReadAttribFlt(buf, index, "y"); |
| 139 | |
| 140 | if(*tex_name) pWnd->InitLeftTop(*tex_name, x,y); |
| 141 | |
| 142 | |
| 143 | strconcat(buf,path,":left_bottom_texture"); |
| 144 | tex_name = xml_doc.Read(buf, index, NULL); |
| 145 | |
| 146 | x = xml_doc.ReadAttribFlt(buf, index, "x"); |
| 147 | y = xml_doc.ReadAttribFlt(buf, index, "y"); |
| 148 | |
| 149 | if(*tex_name) pWnd->InitLeftBottom(*tex_name, x,y); |
| 150 | */ |
| 151 | //инициализировать заголовок окна |
| 152 | strconcat(sizeof(buf), buf, path, ":title"); |
| 153 | if (xml_doc.NavigateToNode(buf, index)) |
| 154 | InitStatic(xml_doc, buf, index, pWnd->UITitleText); |
| 155 | |
| 156 | pWnd->BringToTop(pWnd->UITitleText); |
| 157 | |
| 158 | return true; |
| 159 | } |
| 160 | |
| 161 | bool CUIXmlInit::InitOptionsItem(CUIXml& xml_doc, const char* paht, int index, CUIOptionsItem* pWnd) |
| 162 | { |