Fixed button text
This commit is contained in:
@ -92,8 +92,8 @@ void UIRenderer::drawButton(SDL_Renderer* renderer, FontAtlas* font, float cx, f
|
||||
// Reset color mod
|
||||
SDL_SetTextureColorMod(icon, 255, 255, 255);
|
||||
} else if (font) {
|
||||
// Draw text
|
||||
float textScale = 1.5f;
|
||||
// Draw text (smaller scale for tighter buttons)
|
||||
float textScale = 1.2f;
|
||||
int textW = 0, textH = 0;
|
||||
font->measure(label, textScale, textW, textH);
|
||||
float tx = x + (w - static_cast<float>(textW)) * 0.5f;
|
||||
|
||||
Reference in New Issue
Block a user