minor fix

This commit is contained in:
2025-11-22 10:59:47 +01:00
parent ec2bb1bb1e
commit 0ffd801743
8 changed files with 105 additions and 32 deletions

View File

@ -122,7 +122,8 @@ void GameRenderer::renderPlayingState(
float logicalScale,
float winW,
float winH,
bool showExitConfirmPopup
bool showExitConfirmPopup,
int exitPopupSelectedButton
) {
if (!game || !pixelFont) return;
@ -460,6 +461,10 @@ void GameRenderer::renderPlayingState(
float btnY = popupY + popupH - 60.0f;
// YES button
if (exitPopupSelectedButton == 0) {
// Draw glow for selected YES button
drawRectWithOffset(yesX - 6.0f, btnY - 6.0f, btnW + 12.0f, btnH + 12.0f, {255, 220, 0, 100});
}
drawRectWithOffset(yesX - 2.0f, btnY - 2.0f, btnW + 4.0f, btnH + 4.0f, {100, 120, 140, 255});
drawRectWithOffset(yesX, btnY, btnW, btnH, {200, 60, 60, 255});
const std::string yes = "YES";
@ -469,6 +474,10 @@ void GameRenderer::renderPlayingState(
yes, 1.0f, {255, 255, 255, 255});
// NO button
if (exitPopupSelectedButton == 1) {
// Draw glow for selected NO button
drawRectWithOffset(noX - 6.0f, btnY - 6.0f, btnW + 12.0f, btnH + 12.0f, {255, 220, 0, 100});
}
drawRectWithOffset(noX - 2.0f, btnY - 2.0f, btnW + 4.0f, btnH + 4.0f, {100, 120, 140, 255});
drawRectWithOffset(noX, btnY, btnW, btnH, {80, 140, 80, 255});
const std::string no = "NO";

View File

@ -26,7 +26,8 @@ public:
float logicalScale,
float winW,
float winH,
bool showExitConfirmPopup
bool showExitConfirmPopup,
int exitPopupSelectedButton = 1 // 0=YES, 1=NO
);
private: