Commit Graph

5 Commits

Author SHA1 Message Date
8706723d53 refactor(ui): simplify Button API with property setters 2026-07-15 11:06:49 +08:00
e911413d84 feat(scene): add credits scene and UI 2026-07-14 16:28:26 +08:00
80ba6dad89 feat(ui): add Rect widget with fill, color, and parent-relative sizing 2026-07-13 20:48:51 +08:00
acb0b94d7b feat(main_menu): add exit button and refactor layout with ColumnLayout
- Add `should_close_window()` method to force window close from UI.
- Replace standalone button with ColumnLayout for proper centering.
- Add "Exit" button that calls `should_close_window()`.
- Update ESC key handling to only close window when game is not running.
- Fix ColumnLayout to respect parent's anchor instead of hardcoded TOP_LEFT.
- Remove unused parameter name in Image::update for consistency.
2026-07-13 18:15:34 +08:00
e7082bdbe0 feat(ui): introduce ColumnLayout widget and refactor widget parenting
- Add ColumnLayout widget that arranges children vertically with spacing.
- Refactor Widget::add_child to automatically pass `this` as parent.
- Update DebugCollector to use ColumnLayout for consistent spacing.
- Expose children() accessor in Widget for layout management.
2026-07-13 16:01:00 +08:00