void VDebugProfiling::RebuildMenu() { const char* szGroupName = "Debug Profiling"; DeRegisterCallbacks(); VAppMenu* pMainMenu = GetParent()->GetAppModule<VAppMenu>(); if (pMainMenu == NULL) return; pMainMenu->RemoveGroup(szGroupName); VProfilingNode* pRoot = Vision::Profiling.GetProfilingRootNode(); if (pRoot) { VAppMenuItems items; const unsigned int iCount = Vision::Profiling.GetNumOfGroups(); for (unsigned int i=0; i<iCount; ++i) { VProfilingNode* pNode = pRoot->Children().GetAt(i); if (pNode) items.Add(VAppMenuItem(pNode->GetName(), i, i, true)); } items.Add(VAppMenuItem("Reset Max Values", s_iResetMaxValuesAction, iCount, false)); m_callbacks = pMainMenu->RegisterGroup(szGroupName, items, NULL, VAPP_DEFAULT_SORTING_1, false); RegisterCallbacks(); } }
void VCameraHandling::ReleaseCameraList() { DeactivateAllCameras(); DeRegisterCallbacks(); VAppMenu* pMainMenu = GetParent()->GetAppModule<VAppMenu>(); if (pMainMenu != NULL) pMainMenu->RemoveGroup(m_sMenuGroupName); m_callbacks.RemoveAll(); m_actionMap.RemoveAll(); m_iWASDActionIndex = -1; }