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