Make the intro story skippable.
This commit is contained in:
parent
0df63ea074
commit
c14e244084
3 changed files with 6 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ namespace gui {
|
|||
|
||||
if($story->playing()) {
|
||||
if(ev == game::Event::MOUSE_CLICK) {
|
||||
$story->reset();
|
||||
$story->stop();
|
||||
}
|
||||
} else {
|
||||
$story = nullptr;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ namespace storyboard {
|
|||
void reset();
|
||||
void track_audio();
|
||||
bool playing();
|
||||
void stop();
|
||||
void config_camera(cinematic::Camera &camera);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue