Merge pull request #3095 from Domanffe/perf/server-row-sprite-path

🤖 Agent: read the diff at b9494af97 ("Server list: build each row's sprite key once") against the 26.3 source it cites; verify green, merges cleanly with main. Proof: cg25 union a051cc285 (local branch cg25/union in t3-ef805fdb: main 6d3489d30 + 38 contributor heads merged cleanly, no fixups): clippy -p horizon-client --all-targets -D warnings clean, horizon-client lib 1105 + bin 133 + integration tests pass, parity --changed 355/355 harnesses PASS on the Mac mini (Cargo.lock changed by #3210, so every harness ran; tab_list passed on its one retry).
This commit is contained in:
Ludovic Marie
2026-10-28 19:57:44 +01:00
committed by GitHub
+4 -12
View File
@@ -734,7 +734,7 @@ impl Screen {
motd.resolve_legacy(),
Ping::player_count(*players),
format!(
"server_list/ping_{}",
"gui/sprites/server_list/ping_{}",
match ms {
0..150 => 5,
150..300 => 4,
@@ -748,7 +748,7 @@ impl Screen {
Text::translate("multiplayer.status.cannot_connect", &[])
.with_color(0xFF0000),
Text::empty(),
"server_list/unreachable".to_owned(),
"gui/sprites/server_list/unreachable".to_owned(),
),
_ => {
// The pinging bars bounce, offset by the row.
@@ -757,7 +757,7 @@ impl Screen {
(
Text::translate("multiplayer.status.pinging", &[]),
Text::empty(),
format!("server_list/pinging_{}", frame + 1),
format!("gui/sprites/server_list/pinging_{}", frame + 1),
)
}
};
@@ -778,15 +778,7 @@ impl Screen {
);
}
let icon_x = cx + ROW_WIDTH - 4.0 - 15.0;
batch.sprite_scaled(
atlas,
&format!("gui/sprites/{sprite}"),
icon_x,
cy,
10.0,
8.0,
u32::MAX,
);
batch.sprite_scaled(atlas, &sprite, icon_x, cy, 10.0, 8.0, u32::MAX);
let sw = atlas.font.width_text(&status).ceil();
batch.text_styled(
atlas,