fixed keybord selection for quit game play
This commit is contained in:
@ -277,6 +277,7 @@ static void drawSettingsPopup(SDL_Renderer* renderer, FontAtlas& font, bool musi
|
||||
static double logoAnimCounter = 0.0;
|
||||
static bool showSettingsPopup = false;
|
||||
static bool showExitConfirmPopup = false;
|
||||
static int exitPopupSelectedButton = 1; // 0 = YES, 1 = NO
|
||||
static bool musicEnabled = true;
|
||||
static int hoveredButton = -1; // -1 = none, 0 = play, 1 = level, 2 = settings
|
||||
static bool isNewHighScore = false;
|
||||
@ -650,6 +651,7 @@ int main(int, char **)
|
||||
ctx.hoveredButton = &hoveredButton;
|
||||
ctx.showSettingsPopup = &showSettingsPopup;
|
||||
ctx.showExitConfirmPopup = &showExitConfirmPopup;
|
||||
ctx.exitPopupSelectedButton = &exitPopupSelectedButton;
|
||||
|
||||
// Instantiate state objects
|
||||
auto loadingState = std::make_unique<LoadingState>(ctx);
|
||||
@ -1324,7 +1326,8 @@ int main(int, char **)
|
||||
logicalScale,
|
||||
(float)winW,
|
||||
(float)winH,
|
||||
showExitConfirmPopup
|
||||
showExitConfirmPopup,
|
||||
exitPopupSelectedButton
|
||||
);
|
||||
break;
|
||||
case AppState::GameOver:
|
||||
|
||||
Reference in New Issue
Block a user