您的位置:首页 > 产品设计 > UI/UE

(CEGUI)如何复制一个窗口

2010-10-12 11:07 225 查看
//------------------------------------------------------------------------
Window* CopyWindow( const CEGUI::Window* pSource )
{
// 创建相同类型的窗口,但名字不同
Window* copy = CEGUI::WindowManager::getSingleton().createWindow(pSource->getType(), pSource->getName() + "_copy");

// 复制窗口属性

CEGUI::PropertySet::Iterator propertyIt = pSource->getPropertyIterator();

while (!propertyIt.isAtEnd())
{
const CEGUI::String propertyName = propertyIt.getCurrentKey();
copy->setProperty(propertyName, pSource->getProperty(propertyName));
propertyIt++;
}

//返回窗口
return copy;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: