MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / handleInputEvent

Method handleInputEvent

source/frontend/StarTitleScreen.cpp:101–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101bool TitleScreen::handleInputEvent(InputEvent const& event) {
102 if (auto mouseMove = event.ptr<MouseMoveEvent>())
103 m_cursorScreenPos = Vec2I(mouseMove->mousePosition);
104
105 if (event.is<KeyDownEvent>()) {
106 if (GuiContext::singleton().actions(event).contains(InterfaceAction::TitleBack)) {
107 back();
108 return true;
109 }
110 }
111
112 return m_paneManager.sendInputEvent(event);
113}
114
115void TitleScreen::update(float dt) {
116 m_cursor.update(dt);

Callers

nothing calls this directly

Calls 4

singletonClass · 0.85
sendInputEventMethod · 0.80
containsMethod · 0.45
actionsMethod · 0.45

Tested by

no test coverage detected