Style the rest of the interface: panels, sliders, scrollbars, cards
ci / verify (push) Successful in 48s
ci / verify (push) Successful in 48s
Buttons were the easy half. This is everything else. Dialogs sit on panels now rather than being text over a dimmed world -- the pause menu, character select, upgrades, settings and credits all root through UiTheme.dialog_panel(). The panel stylebox is the pack's frame MODULATED DARK. The set is cream throughout, which is right for buttons and wrong for a dialog over a dark dungeon; tinting keeps the pixel border and the corner shape and lets every label the game already draws in light colours stay readable, instead of recolouring every label in five screens to suit the art. Sliders and scrollbars are the pack's too, section headings sit on its banner ribbon, and an upgrade card's rarity is now its frame rather than a word on it -- three choices are compared at a glance and a colour reads faster than a label. Two bugs of the same shape, and neither was findable without looking at the screen. A Slider and a ScrollBar take their THICKNESS from the stylebox's minimum size, which for a StyleBoxTexture is its content margins. Mine were zero, so both resolved the correct stylebox, reported the correct texture, and drew a groove zero pixels tall. A probe confirmed the theme was resolving perfectly while the track was invisible. Tests now assert every slider and scrollbar stylebox has a non-zero minimum, and it is gotcha 7 in CLAUDE.md. The first attempt at the slider groove also used the pack's HOLLOW bar sprite, whose middle is transparent -- tinting it dark left an outline and nothing else. It uses the solid one. tools/screenshot.tscn gained the upgrade screen, which it has to stage: the game scene owns that screen's visibility and re-asserts it every frame, so setting `visible` lasted exactly one frame, and standing the player at the NPC client-side lasted until reconciliation pulled them back. It now moves the player on both sides and holds it until the shot. That tool has caught four bugs the automated gates all passed. check.sh clean, 468 tests, SMOKE PASS, all four diagnostics green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -148,7 +148,13 @@ ticks in milliseconds with no SceneTree.
|
||||
(`UiTheme.themed_root()`). `tests/unit/test_ui_theme.gd` instantiates every
|
||||
screen and asks what its buttons actually resolve, because this failure is
|
||||
invisible to every other kind of check.
|
||||
7. **`ProjectSettings.save()` drops settings equal to the engine default** and
|
||||
7. **A themed `Slider` or `ScrollBar` takes its THICKNESS from the stylebox's
|
||||
minimum size**, which for a `StyleBoxTexture` is its content margins. Style
|
||||
one with margins of zero and it resolves correctly, reports the right
|
||||
texture, and draws a groove zero pixels tall — indistinguishable from having
|
||||
no theme at all. Both happened. `tests/unit/test_ui_theme.gd` asserts every
|
||||
slider and scrollbar stylebox has a non-zero minimum.
|
||||
8. **`ProjectSettings.save()` drops settings equal to the engine default** and
|
||||
strips comments. Anything load-bearing (the 60 Hz tick) is asserted in code
|
||||
in `src/main.gd` instead of trusted to `project.godot`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user