amethyst / amethyst/rustrogueliketutorial
Wrong value in UI (Chapter 52)
- 主要言語
- Rust
- スター
- 970
- フォーク
- 166
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.)
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。