nous sons

This commit is contained in:
2025-12-17 17:05:42 +01:00
parent ec333efe66
commit 8bc259b25a
12 changed files with 105 additions and 96 deletions

View File

@@ -61,16 +61,11 @@ void GestorPuntuacioFlotant::dibuixar() {
if (!pf.actiu)
continue;
// 1. Calcular dimensions del text per centrar-lo
// Renderitzar centrat amb brightness (fade)
constexpr float escala = Defaults::FloatingScore::SCALE;
constexpr float spacing = Defaults::FloatingScore::SPACING;
float text_width = text_.get_text_width(pf.text, escala, spacing);
// 2. Centrar text sobre la posició
Punt render_pos = {pf.posicio.x - text_width / 2.0f, pf.posicio.y};
// 3. Renderitzar amb brightness (fade)
text_.render(pf.text, render_pos, escala, spacing, pf.brightness);
text_.render_centered(pf.text, pf.posicio, escala, spacing, pf.brightness);
}
}