//------------------------------------------------------------------------------------------------------- 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"); } }
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); }