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($story->playing()) {
|
||||||
if(ev == game::Event::MOUSE_CLICK) {
|
if(ev == game::Event::MOUSE_CLICK) {
|
||||||
$story->reset();
|
$story->stop();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$story = nullptr;
|
$story = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,10 @@ namespace storyboard {
|
||||||
window.draw($view_sprite);
|
window.draw($view_sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UI::stop() {
|
||||||
|
$audio->stop();
|
||||||
|
}
|
||||||
|
|
||||||
bool UI::playing() {
|
bool UI::playing() {
|
||||||
return $audio->getStatus() == sf::SoundSource::Status::Playing;
|
return $audio->getStatus() == sf::SoundSource::Status::Playing;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ namespace storyboard {
|
||||||
void reset();
|
void reset();
|
||||||
void track_audio();
|
void track_audio();
|
||||||
bool playing();
|
bool playing();
|
||||||
|
void stop();
|
||||||
void config_camera(cinematic::Camera &camera);
|
void config_camera(cinematic::Camera &camera);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue