| 766 | } |
| 767 | |
| 768 | CUIXmlInit::StaticsVec CUIXmlInit::InitAutoStatic(CUIXml& xml_doc, LPCSTR tag_name, CUIWindow* pParentWnd) |
| 769 | { |
| 770 | int items_num = xml_doc.GetNodesNum(xml_doc.GetRoot(), tag_name); |
| 771 | // tmp statics vector |
| 772 | StaticsVec tmpVec; |
| 773 | |
| 774 | CUIStatic* pUIStatic = NULL; |
| 775 | for (int i = 0; i < items_num; i++) |
| 776 | { |
| 777 | pUIStatic = xr_new<CUIStatic>(); |
| 778 | InitStatic(xml_doc, tag_name, i, pUIStatic); |
| 779 | pUIStatic->SetAutoDelete(true); |
| 780 | pParentWnd->AttachChild(pUIStatic); |
| 781 | tmpVec.push_back(pUIStatic); |
| 782 | pUIStatic = NULL; |
| 783 | } |
| 784 | |
| 785 | return tmpVec; |
| 786 | } |
| 787 | |
| 788 | bool CUIXmlInit::InitFont(CUIXml& xml_doc, LPCSTR path, int index, u32& color, CGameFont*& pFnt) |
| 789 | { |