Skip to content

Use the shared original UI code - #4

Merged
hazeliscoding merged 3 commits into
mainfrom
shared-ui
Oct 15, 2026
Merged

hazeliscoding merged 3 commits into
mainfrom
shared-ui

Conversation

@hazeliscoding

Copy link
Copy Markdown
Owner

Moves the code that draws the original's interface into the engine, the same way M6 moved the board renderer, so Community Edition's Classic theme can draw the original HUD, controls bar, menu, help and text with this port's code. Nothing about what this port shows, or when, changes.

What moved

To the engine's PuzzleBoy.Rendering (engine 842ed69, pinned here at 49a07d8):

  • Hud.cs: Hud, UiLayout, UiSheets, HudState, BarSet
  • TextRenderer.cs: TextRenderer, BakedText
  • Menu.cs: Menu, MenuItem, KeyRepeat
  • Dialogue.cs: Dialogue, because Hud.DrawDialogue takes one. When the Manikin Kid talks stays in PuzzleBoyGame.

PuzzleBoyGame, GameAssets, OriginalStageOrder and Program stay here. GameAssets.cs gains using PuzzleBoy.Rendering; for UiSheets.

Fidelity evidence

Each moved file diffed against 83c9565 (main before the move): 8 files, 1,081 lines. 19 lines changed and 1 removed:

  • 8 namespace lines (PuzzleBoy to PuzzleBoy.Rendering, tests to PuzzleBoy.Rendering.Tests)
  • 11 type declarations internal to public
  • Hud.cs drops using PuzzleBoy.Rendering;, which is now its own namespace

No citation, statement, constant or expression changed. PuzzleBoy no-game-here prints the same missing-game message. Not checked: a screen drawn from a real install.

Tests

Before After
puzzle-boy 51 23 (Controls 17, PreservationScope 6)
engine 238 266

28 cases moved: Hud 10, TextRenderer 10, Menu 4, Dialogue 4. ControlsTests stays whole, since every case reads PuzzleBoyGame's key tables. None lost.

Commits

  • build: bump engine to 49a07d8, which builds and passes all 51 tests before the deletions
  • refactor: use the shared HUD, menus and text
  • docs: record the shared original UI as M7: ROADMAP M7 and ledger, AGENTS.md layout, docs/architecture.md

Engine CI passed at 842ed69 (run 38777842184) and 49a07d8 (run 38778313341).

- 842ed69 refactor: move the original HUD, menus and text into PuzzleBoy.Rendering
- 49a07d8 docs: record the shared original UI as E4
Hud, TextRenderer, Menu and Dialogue now come from the engine's
PuzzleBoy.Rendering, so this port's copies and their tests (28 cases)
go. GameAssets imports PuzzleBoy.Rendering for UiSheets.
@hazeliscoding
hazeliscoding merged commit 6e8f426 into main Oct 15, 2026
1 check passed
@hazeliscoding
hazeliscoding deleted the shared-ui branch October 15, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant