Fixed selected level state
This commit is contained in:
@ -1096,7 +1096,8 @@ int main(int, char **)
|
||||
|
||||
// Draw blended backgrounds if needed
|
||||
if (levelBackgroundTex || nextLevelBackgroundTex) {
|
||||
SDL_FRect fullRect = { 0, 0, (float)logicalVP.w, (float)logicalVP.h };
|
||||
// Use actual window pixel size so backgrounds always cover full screen
|
||||
SDL_FRect fullRect = { 0, 0, (float)winW, (float)winH };
|
||||
// if fade in progress
|
||||
if (nextLevelBackgroundTex && levelFadeAlpha < 1.0f && levelBackgroundTex) {
|
||||
// draw current with inverse alpha
|
||||
@ -1123,10 +1124,10 @@ int main(int, char **)
|
||||
} else if (state == AppState::Loading) {
|
||||
// Use 3D starfield for loading screen (full screen)
|
||||
starfield3D.draw(renderer);
|
||||
} else if (state == AppState::Menu) {
|
||||
} else if (state == AppState::Menu || state == AppState::LevelSelector) {
|
||||
// Use static background for menu, stretched to window; no starfield on sides
|
||||
if (backgroundTex) {
|
||||
SDL_FRect fullRect = { 0, 0, (float)logicalVP.w, (float)logicalVP.h };
|
||||
SDL_FRect fullRect = { 0, 0, (float)winW, (float)winH };
|
||||
SDL_RenderTexture(renderer, backgroundTex, nullptr, &fullRect);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user