GUI: don't allow input when intro is playing
This commit is contained in:
parent
61beb8c4df
commit
fc8095f53c
|
@ -1200,6 +1200,7 @@ void FurnaceGUI::valueInput(int num, bool direct, int target) {
|
|||
}
|
||||
|
||||
void FurnaceGUI::keyDown(SDL_Event& ev) {
|
||||
if (introPos<9.0 && !shortIntro) return;
|
||||
if (ImGuiFileDialog::Instance()->IsOpened()) return;
|
||||
if (aboutOpen) return;
|
||||
|
||||
|
@ -2716,6 +2717,7 @@ int _processEvent(void* instance, SDL_Event* event) {
|
|||
}
|
||||
|
||||
int FurnaceGUI::processEvent(SDL_Event* ev) {
|
||||
if (introPos<9.0 && !shortIntro) return 1;
|
||||
#ifdef IS_MOBILE
|
||||
if (ev->type==SDL_APP_TERMINATING) {
|
||||
// TODO: save last song state here
|
||||
|
@ -2928,7 +2930,7 @@ void FurnaceGUI::pointDown(int x, int y, int button) {
|
|||
bindSetTarget=0;
|
||||
bindSetPrevValue=0;
|
||||
}
|
||||
if (introPos<9.0) {
|
||||
if (introPos<9.0 && !shortIntro) {
|
||||
introSkipDo=true;
|
||||
}
|
||||
}
|
||||
|
@ -2948,7 +2950,7 @@ void FurnaceGUI::pointUp(int x, int y, int button) {
|
|||
macroDragLastY=-1;
|
||||
macroLoopDragActive=false;
|
||||
waveDragActive=false;
|
||||
if (introPos<9.0 && introSkip<0.5) {
|
||||
if (introPos<9.0 && introSkip<0.5 && !shortIntro) {
|
||||
introSkipDo=false;
|
||||
}
|
||||
if (sampleDragActive) {
|
||||
|
|
|
@ -112,10 +112,10 @@ void FurnaceGUI::drawIntro() {
|
|||
|
||||
// part 1 - talogo
|
||||
if (introPos<2.3) {
|
||||
drawImage(dl,GUI_IMAGE_TALOGO,ImVec2(0.5,0.5),ImVec2(0.7,0.7),0.0f,ImVec2(0.0,0.0),ImVec2(1.0,1.0),ImVec4(1.0,1.0,1.0,MAX(0.01,1.0-pow(MAX(0.0,1.0-introPos*2.0),3.0))));
|
||||
drawImage(dl,GUI_IMAGE_TALOGO,ImVec2(0.5,0.5),ImVec2(0.67,0.67),0.0f,ImVec2(0.0,0.0),ImVec2(1.0,1.0),ImVec4(1.0,1.0,1.0,MAX(0.01,1.0-pow(MAX(0.0,1.0-introPos*2.0),3.0))));
|
||||
|
||||
for (int i=0; i<16; i++) {
|
||||
double chipCenter=0.25+pow(MAX(0.0,1.5-introPos*0.8-((double)i/36.0)),2.0)+pow(sin(-introPos*2.2-(double)i*0.44),24)*0.05;
|
||||
double chipCenter=0.22+pow(MAX(0.0,1.5-introPos*0.8-((double)i/36.0)),2.0)+pow(sin(-introPos*2.2-(double)i*0.44),24)*0.05;
|
||||
ImVec2 chipPos=ImVec2(
|
||||
0.5+chipCenter*cos(2.0*M_PI*(double)i/16.0-pow(introPos,2.2)),
|
||||
0.5+chipCenter*sin(2.0*M_PI*(double)i/16.0-pow(introPos,2.2))
|
||||
|
@ -239,7 +239,8 @@ void FurnaceGUI::drawIntro() {
|
|||
|
||||
if (mustClear<=0) {
|
||||
introPos+=ImGui::GetIO().DeltaTime;
|
||||
if (introPos>=9.0) {
|
||||
if (introPos>=(shortIntro?1.0:9.0)) {
|
||||
introPos=10.0;
|
||||
tutorial.introPlayed=true;
|
||||
commitTutorial();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue