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

Method sendEvent

source/frontend/StarCharSelection.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50bool CharSelectionPane::sendEvent(InputEvent const& event) {
51 if (m_visible) {
52 if (auto mouseWheel = event.ptr<MouseWheelEvent>()) {
53 if (inMember(*context()->mousePosition(event))) {
54 if (mouseWheel->mouseWheel == MouseWheel::Down)
55 shiftCharacters(1);
56 else if (mouseWheel->mouseWheel == MouseWheel::Up)
57 shiftCharacters(-1);
58 return true;
59 }
60 }
61 }
62 return Pane::sendEvent(event);
63}
64
65void CharSelectionPane::show() {
66 Pane::show();

Callers

nothing calls this directly

Calls 1

mousePositionMethod · 0.45

Tested by

no test coverage detected