| 277 | } |
| 278 | |
| 279 | bool CUIXmlInit::InitText(CUIXml& xml_doc, LPCSTR path, int index, CUIStatic* pWnd) |
| 280 | { |
| 281 | InitText(xml_doc, path, index, (IUITextControl*)pWnd); |
| 282 | shared_str al = xml_doc.ReadAttrib(path, index, "vert_align", ""); |
| 283 | if (0 == xr_strcmp(al, "c")) |
| 284 | pWnd->SetVTextAlignment(valCenter); |
| 285 | else if (0 == xr_strcmp(al, "b")) |
| 286 | pWnd->SetVTextAlignment(valBotton); |
| 287 | else if (0 == xr_strcmp(al, "t")) |
| 288 | pWnd->SetVTextAlignment(valTop); |
| 289 | |
| 290 | pWnd->SetTextComplexMode(xml_doc.ReadAttribInt(path, index, "complex_mode", 0) ? true : false); |
| 291 | |
| 292 | // Text coordinates |
| 293 | float text_x = xml_doc.ReadAttribFlt(path, index, "x", 0); |
| 294 | float text_y = xml_doc.ReadAttribFlt(path, index, "y", 0); |
| 295 | pWnd->SetTextX(text_x); |
| 296 | pWnd->SetTextY(text_y); |
| 297 | |
| 298 | return true; |
| 299 | } |
| 300 | |
| 301 | bool CUIXmlInit::InitText(CUIXml& xml_doc, const char* path, int index, IUITextControl* pWnd) |
| 302 | { |
nothing calls this directly
no test coverage detected