本文整理汇总了C++中CUIStatic::SetCustomDraw方法的典型用法代码示例。如果您正苦于以下问题:C++ CUIStatic::SetCustomDraw方法的具体用法?C++ CUIStatic::SetCustomDraw怎么用?C++ CUIStatic::SetCustomDraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUIStatic
的用法示例。
在下文中一共展示了CUIStatic::SetCustomDraw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: construct
void CUIArtefactDetectorElite::construct(CEliteDetector* p)
{
m_parent = p;
CUIXml uiXml;
uiXml.Load (CONFIG_PATH, UI_PATH, "ui_detector_artefact.xml");
CUIXmlInit xml_init;
string512 buff;
xr_strcpy (buff, p->ui_xml_tag());
xml_init.InitWindow (uiXml, buff, 0, this);
m_wrk_area = xr_new<CUIWindow>();
xr_sprintf (buff, "%s:wrk_area", p->ui_xml_tag());
xml_init.InitWindow (uiXml, buff, 0, m_wrk_area);
m_wrk_area->SetAutoDelete (true);
AttachChild (m_wrk_area);
xr_sprintf (buff, "%s", p->ui_xml_tag());
int num = uiXml.GetNodesNum (buff,0,"palette");
XML_NODE* pStoredRoot = uiXml.GetLocalRoot();
uiXml.SetLocalRoot (uiXml.NavigateToNode(buff,0));
for(int idx=0; idx<num;++idx)
{
CUIStatic* S = xr_new<CUIStatic>();
shared_str name = uiXml.ReadAttrib("palette",idx,"id");
m_palette[name] = S;
xml_init.InitStatic (uiXml, "palette", idx, S);
S->SetAutoDelete (true);
m_wrk_area->AttachChild (S);
S->SetCustomDraw (true);
}
uiXml.SetLocalRoot (pStoredRoot);
Fvector _map_attach_p = pSettings->r_fvector3(m_parent->cNameSect(), "ui_p");
Fvector _map_attach_r = pSettings->r_fvector3(m_parent->cNameSect(), "ui_r");
_map_attach_r.mul (PI/180.f);
m_map_attach_offset.setHPB (_map_attach_r.x, _map_attach_r.y, _map_attach_r.z);
m_map_attach_offset.translate_over (_map_attach_p);
}