nous sons
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user