| 29 | } |
| 30 | |
| 31 | void InputManager::initialise() |
| 32 | { |
| 33 | MYGUI_ASSERT(!mIsInitialise, getClassTypeName() << " initialised twice"); |
| 34 | MYGUI_LOG(Info, "* Initialise: " << getClassTypeName()); |
| 35 | |
| 36 | mWidgetMouseFocus = nullptr; |
| 37 | mWidgetKeyFocus = nullptr; |
| 38 | mLayerMouseFocus = nullptr; |
| 39 | for (int i = MouseButton::Button0; i < MouseButton::MAX; ++i) |
| 40 | { |
| 41 | mMouseCapture[i] = false; |
| 42 | } |
| 43 | mIsShiftPressed = false; |
| 44 | mIsControlPressed = false; |
| 45 | mIsAltPressed = false; |
| 46 | mIsMetaPressed = false; |
| 47 | |
| 48 | mHoldKey = KeyCode::None; |
| 49 | mHoldChar = 0; |
| 50 | mFirstPressKey = true; |
| 51 | mTimerKey = 0.0f; |
| 52 | mOldAbsZ = 0; |
| 53 | |
| 54 | WidgetManager::getInstance().registerUnlinker(this); |
| 55 | Gui::getInstance().eventFrameStart += newDelegate(this, &InputManager::frameEntered); |
| 56 | |
| 57 | MYGUI_LOG(Info, getClassTypeName() << " successfully initialized"); |
| 58 | mIsInitialise = true; |
| 59 | } |
| 60 | |
| 61 | void InputManager::shutdown() |
| 62 | { |
nothing calls this directly
no test coverage detected