Fixed menu
This commit is contained in:
@ -108,7 +108,11 @@ void UIRenderer::drawButton(SDL_Renderer* renderer, FontAtlas* font, float cx, f
|
||||
font->measure(label, textScale, textW, textH);
|
||||
float tx = x + (w - static_cast<float>(textW)) * 0.5f;
|
||||
// Adjust vertical position for better alignment with background buttons
|
||||
float ty = y + (h - static_cast<float>(textH)) * 0.5f + 2.0f;
|
||||
// Vertically center text precisely within the button
|
||||
// Vertically center text precisely within the button, then nudge down slightly
|
||||
// to improve optical balance relative to icons and button art.
|
||||
const float textNudge = 3.0f; // tweak this value to move labels up/down
|
||||
float ty = y + (h - static_cast<float>(textH)) * 0.5f + textNudge;
|
||||
|
||||
// Choose text color based on selection state
|
||||
SDL_Color textColor = {255, 255, 255, 255}; // Default white
|
||||
|
||||
Reference in New Issue
Block a user