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

Method sendEvent

source/frontend/StarQuestTracker.cpp:58–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58bool QuestTrackerPane::sendEvent(InputEvent const& event) {
59 if (Pane::sendEvent(event))
60 return true;
61
62 if (event.is<MouseButtonDownEvent>() && event.get<MouseButtonDownEvent>().mouseButton == MouseButton::Left) {
63 auto mousePos = *context()->mousePosition(event);
64 if ((m_expanded && m_expandedFrame->inMember(mousePos)) ||
65 (!m_expanded && m_frame->inMember(mousePos))) {
66 setExpanded(!m_expanded);
67 return true;
68 }
69 }
70
71 return false;
72}
73
74void QuestTrackerPane::update(float dt) {
75 if (m_currentQuest) {

Callers

nothing calls this directly

Calls 2

inMemberMethod · 0.80
mousePositionMethod · 0.45

Tested by

no test coverage detected