mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
improve menu close transition
This commit is contained in:
parent
bcdc1dc56f
commit
3655de118c
@ -1407,21 +1407,21 @@ static int MenuGame()
|
||||
menu = MENU_EXIT;
|
||||
|
||||
exitSound->Play();
|
||||
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
mainmenuBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
mainmenuBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
#ifdef HW_RVL
|
||||
batteryBtn[0]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
batteryBtn[1]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
batteryBtn[2]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
batteryBtn[3]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
batteryBtn[0]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
batteryBtn[1]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
batteryBtn[2]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
batteryBtn[3]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
#endif
|
||||
|
||||
w.SetEffect(EFFECT_FADE, -20);
|
||||
usleep(200000); // wait for effects to finish
|
||||
w.SetEffect(EFFECT_FADE, -15);
|
||||
usleep(350000); // wait for effects to finish
|
||||
}
|
||||
}
|
||||
|
||||
@ -1699,16 +1699,16 @@ static int MenuGameSaves(int action)
|
||||
menu = MENU_EXIT;
|
||||
|
||||
exitSound->Play();
|
||||
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
backBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
backBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
|
||||
w.SetEffect(EFFECT_FADE, -20);
|
||||
w.SetEffect(EFFECT_FADE, -15);
|
||||
|
||||
usleep(200000); // wait for effects to finish
|
||||
usleep(350000); // wait for effects to finish
|
||||
}
|
||||
}
|
||||
|
||||
@ -1895,16 +1895,16 @@ static int MenuGameSettings()
|
||||
menu = MENU_EXIT;
|
||||
|
||||
exitSound->Play();
|
||||
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
backBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 15);
|
||||
backBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 15);
|
||||
|
||||
w.SetEffect(EFFECT_FADE, -20);
|
||||
w.SetEffect(EFFECT_FADE, -15);
|
||||
|
||||
usleep(200000); // wait for effects to finish
|
||||
usleep(350000); // wait for effects to finish
|
||||
}
|
||||
else if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
@ -1912,7 +1912,7 @@ static int MenuGameSettings()
|
||||
}
|
||||
}
|
||||
|
||||
if(menu == MENU_GAME || menu == MENU_EXIT)
|
||||
if(menu == MENU_GAME)
|
||||
SavePrefs(NOTSILENT);
|
||||
|
||||
HaltGui();
|
||||
@ -3672,11 +3672,6 @@ MainMenu (int menu)
|
||||
ShutoffRumble();
|
||||
#endif
|
||||
|
||||
#ifndef NO_SOUND
|
||||
if(exitSound->IsPlaying())
|
||||
usleep(150000); // give sound more time to play
|
||||
#endif
|
||||
|
||||
CancelAction();
|
||||
HaltGui();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user