MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / InitAutoStatic

Method InitAutoStatic

ogsr_engine/xrGame/ui/UIXmlInit.cpp:768–786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768CUIXmlInit::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
788bool CUIXmlInit::InitFont(CUIXml& xml_doc, LPCSTR path, int index, u32& color, CGameFont*& pFnt)
789{

Callers 7

InitMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80

Calls 3

GetNodesNumMethod · 0.80
AttachChildMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected