fixed keybord selection for quit game play

This commit is contained in:
2025-11-22 11:14:55 +01:00
parent 0ffd801743
commit a257c5cd79
7 changed files with 39 additions and 12 deletions

View File

@ -586,6 +586,7 @@ bool ApplicationManager::initializeGame() {
m_stateContext.hoveredButton = &m_hoveredButton;
m_stateContext.showSettingsPopup = &m_showSettingsPopup;
m_stateContext.showExitConfirmPopup = &m_showExitConfirmPopup;
m_stateContext.exitPopupSelectedButton = &m_exitPopupSelectedButton;
// Create state instances
m_loadingState = std::make_unique<LoadingState>(m_stateContext);
@ -1048,7 +1049,8 @@ void ApplicationManager::setupStateHandlers() {
logicalScale,
static_cast<float>(winW),
static_cast<float>(winH),
m_showExitConfirmPopup
m_showExitConfirmPopup,
m_exitPopupSelectedButton
);
// Reset viewport

View File

@ -94,6 +94,7 @@ private:
int m_hoveredButton = -1;
bool m_showSettingsPopup = false;
bool m_showExitConfirmPopup = false;
int m_exitPopupSelectedButton = 1; // 0 = YES, 1 = NO
uint64_t m_loadStartTicks = 0;
bool m_musicStarted = false;
bool m_musicLoaded = false;