diff --git a/src/render.rs b/src/render.rs index 28d730d..2ce0621 100644 --- a/src/render.rs +++ b/src/render.rs @@ -1,3 +1,29 @@ +// Layout constants — which value controls which part of the window: +// +// One board cell: +// +// ◄── CELL_W (14 px) ──► +// ╔════════════════════╗ ▲ +// ║ @ ║ │ CELL_H (20 px) +// ╚════════════════════╝ ▼ +// +// Full window (Edit mode shown; side panel absent in Play mode): +// +// ◄────────────────── DEFAULT_WINDOW_W (840 px) ───────────────────► +// ┌────────────────────────────────────────────────────────────────┐ ▲ +// │ File │ Play Edit │ │ MENU_H (24 px) +// ├────────────────────────────────────────────────┬───────────────┤ ▼ +// │ PANEL_MARGIN (8 px) on all sides │ PALETTE_ │ ▲ +// │ ┌──────────────────────────────────────────┐ │ PANEL_W │ │ +// │ │ │ │ (200 px) │ │ DEFAULT_ +// │ │ board cells (CELL_W × CELL_H each) │ │ Edit mode │ │ WINDOW_H +// │ │ │ │ only │ │ (524 px) +// │ └──────────────────────────────────────────┘ │ │ │ +// │ │ │ ▼ +// └────────────────────────────────────────────────┴───────────────┘ +// +// MIN_WINDOW_W and MIN_WINDOW_H are derived: 10 cells wide / 5 cells tall plus margins. + use eframe::egui; use egui::{Align2, FontId, Pos2, Rect, vec2};