本文整理汇总了C++中cegui::Window::getChildAtIdx方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::getChildAtIdx方法的具体用法?C++ Window::getChildAtIdx怎么用?C++ Window::getChildAtIdx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Window
的用法示例。
在下文中一共展示了Window::getChildAtIdx方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdatePetStrenthenWnd
void UpdatePetStrenthenWnd(CEGUI::Window* mainPage, long type)
{
if (!mainPage)
return;
char tempText[256];
CPlayer* player = GetGame()->GetMainPlayer();
map<CGUID, CPet*>* petList = player->GetPetList();
map<CGUID, CPet*>::iterator iterPet = petList->begin();
for (int i=0; iterPet!=petList->end(); ++iterPet,++i)
{
sprintf(tempText, "PetStrengthen/PetSelectWnd/Pet%d/DragContainer", i+1);
CEGUI::Window* dragItem = mainPage->getChildRecursive(tempText);
if (dragItem)
{
CEGUI::GUISheet* childImg = WGUISheet(dragItem->getChildAtIdx(0));
if(!childImg)
return;
SetBackGroundImage(childImg,"PetID","pictures\\Pet\\PetIcon","pet.jpg");
}
if (i>=PET_SELECT_WND_CNT-1)
break;
}
}
示例2: lastTimeSinceLastFrame
//-------------------------------------------------------------------------------------------------------
DebugWindow::DebugWindow() : lastTimeSinceLastFrame(0)
{
mVehicle = nullptr;
CEGUI::Window* rootWindow = CEGUI::WindowManager::getSingletonPtr()->getWindow("Game/DebugWindow");
int numChildren = rootWindow->getChildCount();
for (int iii = 0; iii < numChildren; ++iii)
{
mWindows.push_back(rootWindow->getChildAtIdx(iii));
mWindows[iii]->setFont("DejaVuSans-6");
}
}
示例3: ClearWindow
void ClearWindow(CEGUI::Window& i_window, bool i_destroy)
{
std::vector<CEGUI::Window*> children;
CEGUI::WindowManager* p_window_manager = CEGUI::WindowManager::getSingletonPtr();
for(size_t i = 0; i < i_window.getChildCount(); ++i)
children.push_back(i_window.getChildAtIdx(i));
for(size_t i = 0; i < children.size(); ++i)
p_window_manager->destroyWindow(children.at(i));
if (i_destroy)
p_window_manager->destroyWindow(&i_window);
}