void Game::HandleInput(const unsigned char &key, const int &x, const int &y, const unsigned int &dwKeyboardFlags) { if ((key == '-') || (key == '_')) { CurrentManagerSelectPrevious(); } else if ((key == '=') || (key == '+')) { CurrentManagerSelectNext(); } if (m_pCurrentScene) { m_pCurrentScene->HandleInput(key, x, y, dwKeyboardFlags); } if (dwKeyboardFlags & KEYBOARD_CONTROL_ACTIVE) { if (key == 2) // 'B' or 'b' { if (m_pCurrentScene) { m_pCurrentScene->ToggleBoundingBoxes(); } } else if (key == 3) // 'C' or 'c' { //SetManager("CollisionManager"); } else if (key == 4) // 'D' or 'd' { ToggleDebugRender(); } else if (key == 20) // 'T' or 't' { SetManager("TextureManager"); } else if (key == 21) // 'U' or 'u' { SetManager("UnknownManager"); } else if (key == 15) // 'O' or 'o' { SetManager("ObjectManager"); } else if (key == 22) // 'V' or 'v' { SetManager("VisualManager"); } } else { //check for other flags? } }
DisplayElement::~DisplayElement() { // Remove myself if (mpParent) { mpParent->Remove(this); } // Remove my children while (mpFirstChild) { Remove(mpFirstChild); } // if we are the root, then we need to let go of our DisplayManager if (GetManager()) { SetManager(0); } }
CServiceManage::CServiceManage(LPCTSTR lpszName) { m_hSchSCManager = NULL; SetServiceName(lpszName); SetManager(); }