amethyst / amethyst/rustrogueliketutorial
Wrong value in UI (Chapter 52)
- Lingua principale
- Rust
- Stelle
- 970
- Fork
- 166
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
https://github.com/amethyst/rustrogueliketutorial/blob/33872fe582f226178436847e1f74eafcbf9c0d1a/book/src/chapter_52.md?plain=1#L244
From what I understand, the half width is 24, and not 22 (that would be the half height of the pane).
The title doesn't seem to be centered on the matching screen.
What about extracting size constants to make the UI code easier to read? Something like this:
```
const STATUS_BOX_HEIGHT: i32 = 8; // Top-right panel
pub const CAMERA_WIDTH: i32 = 48;
pub const CAMERA_HEIGHT: i32 = 44;
pub const SCREEN_WIDTH: i32 = 80;
pub const SCREEN_HEIGHT: i32 = 60;
```
(The screen constants are already needed in `main.rs` for example, so it might help to have a single source of truth for these.)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.