fixed main menu background
This commit is contained in:
@ -53,6 +53,16 @@ void UIRenderer::drawButton(SDL_Renderer* renderer, FontAtlas* font, float cx, f
|
||||
bgColor.a};
|
||||
}
|
||||
|
||||
// Neon glow aura around the button to increase visibility (subtle)
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
|
||||
for (int gi = 0; gi < 3; ++gi) {
|
||||
float grow = 6.0f + gi * 3.0f;
|
||||
Uint8 glowA = static_cast<Uint8>(std::max(0, (int)borderColor.a / (3 - gi)));
|
||||
SDL_SetRenderDrawColor(renderer, borderColor.r, borderColor.g, borderColor.b, glowA);
|
||||
SDL_FRect glowRect{x - grow, y - grow, w + grow * 2.0f, h + grow * 2.0f};
|
||||
SDL_RenderRect(renderer, &glowRect);
|
||||
}
|
||||
|
||||
// Draw button background with border
|
||||
SDL_SetRenderDrawColor(renderer, borderColor.r, borderColor.g, borderColor.b, borderColor.a);
|
||||
SDL_FRect borderRect{x - 2, y - 2, w + 4, h + 4};
|
||||
|
||||
Reference in New Issue
Block a user