From c14e244084817cee781d1acf391444f290fa7d54 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Fri, 3 Apr 2026 11:22:29 -0400 Subject: [PATCH] Make the intro story skippable. --- src/gui/fsm.cpp | 2 +- src/gui/storyboard.cpp | 4 ++++ src/gui/storyboard.hpp | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/fsm.cpp b/src/gui/fsm.cpp index 974129c..7ba8910 100644 --- a/src/gui/fsm.cpp +++ b/src/gui/fsm.cpp @@ -69,7 +69,7 @@ namespace gui { if($story->playing()) { if(ev == game::Event::MOUSE_CLICK) { - $story->reset(); + $story->stop(); } } else { $story = nullptr; diff --git a/src/gui/storyboard.cpp b/src/gui/storyboard.cpp index b48bb8c..fc4923c 100644 --- a/src/gui/storyboard.cpp +++ b/src/gui/storyboard.cpp @@ -47,6 +47,10 @@ namespace storyboard { window.draw($view_sprite); } + void UI::stop() { + $audio->stop(); + } + bool UI::playing() { return $audio->getStatus() == sf::SoundSource::Status::Playing; } diff --git a/src/gui/storyboard.hpp b/src/gui/storyboard.hpp index 4dfec3c..b744fc9 100644 --- a/src/gui/storyboard.hpp +++ b/src/gui/storyboard.hpp @@ -29,6 +29,7 @@ namespace storyboard { void reset(); void track_audio(); bool playing(); + void stop(); void config_camera(cinematic::Camera &camera); };