| 535 | } |
| 536 | |
| 537 | bool 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 | |
| 554 | bool Cinematic::suppressInput() const { |
| 555 | return m_suppressInput && !completed(); |
no test coverage detected