Simplify: extract paint_glyph, drop unused param and redundant comments
- Add paint_glyph(painter, rect, glyph) to render.rs; draw_glyph now delegates to it, eliminating the duplicated rect_filled+text pattern that appeared in four places across editor.rs and glyph_picker.rs - Remove unused _board param from show_editor_panel and its call site - Drop redundant section-header comments in glyph_picker.rs (the ui.label() calls immediately below already name each section) - Remove extracted fg/bg/cur_ch locals in the char grid loop now that paint_glyph accepts a Glyph directly - Fix CLAUDE.md update phase description (stale from pre-refactor) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,8 +38,9 @@ The game is a single Rust binary using **eframe 0.33 / egui 0.33** for the GUI.
|
||||
`update` is structured in phases:
|
||||
- Input handling — arrow keys move the player (Play mode only)
|
||||
- `egui::TopBottomPanel::top` — menu bar (File → Exit, Play/Edit mode toggle)
|
||||
- `egui::SidePanel::right` — archetype palette panel (Edit mode only; declared before CentralPanel)
|
||||
- `egui::CentralPanel::default` — game viewport; rendered with `ui.painter()`; click-to-paint in Edit mode
|
||||
- `editor::show_editor_panel` — archetype palette panel (Edit mode only; declared before CentralPanel)
|
||||
- `egui::CentralPanel::default` — game viewport; rendered with `render::draw_board`; click-to-paint in Edit mode
|
||||
- `glyph_picker::show` — floating picker dialog (Edit mode only, when open)
|
||||
|
||||
### Modules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user