feat: Add StageDialogStyler for enhanced dialog management

- Introduced StageDialogStyler class to render child-facing dialogs as shared in-stage cards.
- Preserved native AcceptDialog/ConfirmationDialog signals for stage workflows.
- Implemented methods for applying styles, managing visibility, and handling button actions.
- Added support for dynamic theming and responsive design based on viewport size.
- Created utility functions for styling buttons and managing dialog content.
This commit is contained in:
2026-10-23 01:16:22 -04:00
parent c6f3930dcb
commit 0a5ef0a61e
10 changed files with 1724 additions and 238 deletions
+2
View File
@@ -21,6 +21,8 @@ Use this guide when creating or revising child-facing dialogs, popups, and short
## Theme and implementation
- Put reusable colors, sizes, spacing, radii, and border widths in `SandboxTheme` or `PropTheme` tokens. Apply local stylebox overrides instead of mutating a shared theme resource.
- For Sandbox Stage modal windows, use `StageDialogStyler` in `scripts/shared/stage_ui/stage_dialog_styler.gd` for the shared shell, typography, and primary, secondary, or destructive button roles. Custom Control-based dialogs can reuse its `panel_style()` and `style_button()` helpers.
- Render the shared modal surface as a Control in the stage UI CanvasLayer. Keep the native `AcceptDialog` or `ConfirmationDialog` hidden as the signal source; a full-screen native Window can replace the stage with a blank surface on some render paths.
- Keep larger text from clipping: use containers that can expand or wrap, and size the dialog after its visible content has been laid out.
- Preserve clear hover, pressed, selected, focused, and disabled states. Do not use color as the only indication of a state.
- Adapt the arrangement to each workflow while keeping this shared visual language. The Choose Scenery dialog in `scripts/shared/ui/asset_selector.gd` and its `popups.asset_selector` theme tokens are the current implementation reference.