fix(ui): restore original presentation scale
The recovered client enlarged the 640x460 canvas to 960x690 and shrank the score glyphs, so artwork and numeric displays no longer matched the original pixel presentation. Restore the native window dimensions and title, render score digits at their recovered 16x28 size, and align the score fields to the original layout. Update the user and reconstruction documentation accordingly. Test Plan: - `cargo test --workspace --all-targets --all-features` -- passed, 52 tests - `cargo clippy --workspace --all-targets --all-features -- -D warnings` -- passed - `rumdl check --flavor commonmark CHANGELOG.md README.md RECONSTRUCTION.md` -- passed - `git diff --cached --check` -- passed - `cargo +nightly fmt --all -- --check` -- baseline fails on existing import formatting in touched and untouched Rust files - `prettier --check CHANGELOG.md README.md RECONSTRUCTION.md --prose-wrap always --print-width 80` -- baseline fails on existing whole-file formatting in README.md and RECONSTRUCTION.md
This commit is contained in:
@@ -550,7 +550,7 @@ impl App {
|
||||
},
|
||||
);
|
||||
}
|
||||
self.draw_right_aligned_digits(&game.bonus.to_string(), 610.0, 240.0);
|
||||
self.draw_right_aligned_digits(&game.bonus.to_string(), 605.0, 233.0);
|
||||
|
||||
let media_level = game.player().media_level;
|
||||
if media_level > 0 {
|
||||
@@ -599,8 +599,8 @@ impl App {
|
||||
for (index, player) in game.players.iter().enumerate() {
|
||||
self.draw_right_aligned_digits(
|
||||
&player.score.to_string(),
|
||||
610.0,
|
||||
280.0 + index as f32 * 44.0,
|
||||
605.0,
|
||||
277.0 + index as f32 * 44.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -608,8 +608,8 @@ impl App {
|
||||
fn draw_right_aligned_digits(&self, digits: &str, right: f32, y: f32) {
|
||||
let digit_count = u16::try_from(digits.bytes().filter(u8::is_ascii_digit).count())
|
||||
.expect("a display value has at most ten digits");
|
||||
let width = f32::from(digit_count) * 10.0;
|
||||
self.draw_digits(digits, vec2(right - width, y), vec2(10.0, 18.0));
|
||||
let width = f32::from(digit_count) * 16.0;
|
||||
self.draw_digits(digits, vec2(right - width, y), vec2(16.0, 28.0));
|
||||
}
|
||||
|
||||
fn draw_digits(&self, digits: &str, position: Vec2, digit_size: Vec2) {
|
||||
|
||||
@@ -11,12 +11,12 @@ use app::App;
|
||||
use macroquad::prelude::*;
|
||||
use simulation::{Request, Simulation, usage};
|
||||
|
||||
const WINDOW_WIDTH: i32 = 960;
|
||||
const WINDOW_HEIGHT: i32 = 690;
|
||||
const WINDOW_WIDTH: i32 = 640;
|
||||
const WINDOW_HEIGHT: i32 = 460;
|
||||
|
||||
fn window_conf() -> Conf {
|
||||
Conf {
|
||||
window_title: "TDK Pinball Machine".to_owned(),
|
||||
window_title: "TDK Pinball Machine 1.00".to_owned(),
|
||||
window_width: WINDOW_WIDTH,
|
||||
window_height: WINDOW_HEIGHT,
|
||||
window_resizable: false,
|
||||
|
||||
Reference in New Issue
Block a user