Use the pause and settings mockups as panel backdrops

Add UiArt.add_screen_backdrop() to place the reference art behind an opaque
panel, then wire the pause overlay and settings screen to it. Pause rows get
larger, rounded styles; settings widens to fit its expanded controls. Headless
226/226 verified in a clean HEAD worktree (the realism WIP currently editing
materials.gd remains unstaged).
This commit is contained in:
zwitschi committed 2026-11-01 16:19:18 +01:00
1 parent 4745adeb13
commit 1efa5bc7d9
4 files changed
+70 -13

No files matched your search

+10 -6
View File
@@ -7,6 +7,7 @@ extends CanvasLayer
## and HUD as soon as the player confirms.
const InputBindings := preload("res://src/core/input_bindings.gd")
const UiArt := preload("res://src/game/ui/art.gd")
signal applied(settings: Dictionary)
signal closed()
@@ -39,18 +40,21 @@ func _build() -> void:
_root.mouse_filter = Control.MOUSE_FILTER_STOP
add_child(_root)
var bg := ColorRect.new()
bg.color = Color(0.02, 0.03, 0.05, 0.9)
bg.set_anchors_preset(Control.PRESET_FULL_RECT)
bg.mouse_filter = Control.MOUSE_FILTER_IGNORE
_root.add_child(bg)
var art := UiArt.new()
if not art.add_screen_backdrop(_root, "settings_panel",
Rect2(0.117, 0.049, 0.703, 0.895)):
var bg := ColorRect.new()
bg.color = Color(0.02, 0.03, 0.05, 0.9)
bg.set_anchors_preset(Control.PRESET_FULL_RECT)
bg.mouse_filter = Control.MOUSE_FILTER_IGNORE
_root.add_child(bg)
var center := CenterContainer.new()
center.set_anchors_preset(Control.PRESET_FULL_RECT)
_root.add_child(center)
var column := VBoxContainer.new()
column.custom_minimum_size = Vector2(420, 0)
column.custom_minimum_size = Vector2(640, 0)
column.add_theme_constant_override("separation", 12)
center.add_child(column)