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

Method handleInputEvent

source/frontend/StarCinematic.cpp:537–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537bool Cinematic::handleInputEvent(InputEvent const& event) {
538 if (completed())
539 return false;
540 if (event.is<MouseButtonUpEvent>() || event.is<KeyUpEvent>())
541 return false;
542 if (event.is<KeyDownEvent>()) {
543 if (m_currentTimeSkip) {
544 setTime(m_currentTimeSkip.take().skipToTime);
545 return true;
546 } else if (m_skippable && GuiContext::singleton().actions(event).contains(InterfaceAction::CinematicSkip)) {
547 stop();
548 return true;
549 }
550 }
551 return m_suppressInput;
552}
553
554bool Cinematic::suppressInput() const {
555 return m_suppressInput && !completed();

Callers 1

processInputMethod · 0.45

Calls 4

singletonClass · 0.85
takeMethod · 0.45
containsMethod · 0.45
actionsMethod · 0.45

Tested by

no test coverage detected