MCPcopy Create free account
hub / github.com/MyGUI/mygui / initialise

Method initialise

MyGUIEngine/src/MyGUI_InputManager.cpp:31–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 3

getClassTypeNameFunction · 0.85
newDelegateFunction · 0.85
registerUnlinkerMethod · 0.80

Tested by

no test coverage detected