parent
54e7bd295d
commit
16adc1fb1b
3 changed files with 10 additions and 3 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include "gui.h"
|
||||
#include "../ta-log.h"
|
||||
#include "imgui_internal.h"
|
||||
#include <fmt/printf.h>
|
||||
|
||||
|
|
@ -73,6 +74,8 @@ void FurnaceGUI::drawImage(ImDrawList* dl, FurnaceGUIImages image, const ImVec2&
|
|||
}
|
||||
|
||||
void FurnaceGUI::endIntroTune() {
|
||||
if (introStopped) return;
|
||||
logV("ending intro");
|
||||
stop();
|
||||
if (curFileName.empty()) {
|
||||
e->createNewFromDefaults();
|
||||
|
|
@ -96,6 +99,7 @@ void FurnaceGUI::endIntroTune() {
|
|||
cursor=SelectionPoint();
|
||||
updateWindowTitle();
|
||||
updateScroll(0);
|
||||
introStopped=true;
|
||||
}
|
||||
|
||||
void FurnaceGUI::drawIntro(double introTime, bool monitor) {
|
||||
|
|
@ -291,7 +295,7 @@ void FurnaceGUI::drawIntro(double introTime, bool monitor) {
|
|||
if (introSkipDo) {
|
||||
introSkip+=ImGui::GetIO().DeltaTime;
|
||||
if (introSkip>=0.5) {
|
||||
if (e->isPlaying()) endIntroTune();
|
||||
if (!shortIntro) endIntroTune();
|
||||
introPos=0.1;
|
||||
if (introSkip>=0.75) introPos=12.0;
|
||||
}
|
||||
|
|
@ -318,7 +322,7 @@ void FurnaceGUI::drawIntro(double introTime, bool monitor) {
|
|||
e->setRepeatPattern(false);
|
||||
play();
|
||||
}
|
||||
if (e->isPlaying() && introPos>=10.0 && !shortIntro) endIntroTune();
|
||||
if (introPos>=10.0 && !shortIntro) endIntroTune();
|
||||
introPos+=ImGui::GetIO().DeltaTime;
|
||||
if (introPos>=(shortIntro?1.0:11.0)) {
|
||||
introPos=12.0;
|
||||
|
|
@ -326,5 +330,7 @@ void FurnaceGUI::drawIntro(double introTime, bool monitor) {
|
|||
commitTutorial();
|
||||
}
|
||||
}
|
||||
} else if (!shortIntro) {
|
||||
endIntroTune();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue