CUIFrameWindow* CScriptXmlInit::InitFrame(LPCSTR path, CUIWindow* parent){ CUIFrameWindow* pWnd = xr_new<CUIFrameWindow>(); CUIXmlInit::InitFrameWindow(m_xml, path, 0, pWnd); pWnd->SetAutoDelete(true); _attach_child(pWnd, parent); //. if(parent) parent->AttachChild(pWnd); return pWnd; }
CUIFrameWindow* UIHelper::CreateFrameWindow( CUIXml& xml, LPCSTR ui_path, CUIWindow* parent ) { CUIFrameWindow* ui = new CUIFrameWindow(); parent->AttachChild ( ui ); ui->SetAutoDelete ( true ); CUIXmlInit::InitFrameWindow ( xml, ui_path, 0, ui ); return ui; }