refactor(shell): author shell scenes as editor-previewable node trees
Move the three shell scenes (SystemDock, NarrationBook, MainWindowShell) from build-everything-in-_ready() to authored .tscn node trees with the theme + type-variations set in the editor, so the layout previews and can be arranged in the Godot editor. Scripts keep only on-load work: @onready node refs, DM-loop wiring, the dock slide, and binding seed ShellState into the fixed authored turn-order tokens + consumable slots. Fixes the dock offset + over-long buttons (now fixed-width DockButtons in a right-anchored menu). Headless probe: root 1920x1080, world/book split 1180/740, dock at the world's right edge — no collapse. Suite 138/138. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,86 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
[gd_scene load_steps=3 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/shell/system_dock.gd" id="1"]
|
||||
[ext_resource type="Theme" path="res://assets/theme/game_theme.tres" id="2"]
|
||||
|
||||
[node name="SystemDock" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 240.0
|
||||
offset_bottom = 420.0
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Menu" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -190.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = 316.0
|
||||
grow_horizontal = 0
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="Inventory" type="Button" parent="Menu"]
|
||||
custom_minimum_size = Vector2(0, 42)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"DockButton"
|
||||
text = "I Inventory"
|
||||
alignment = 0
|
||||
metadata/screen_id = &"inventory"
|
||||
|
||||
[node name="Character" type="Button" parent="Menu"]
|
||||
custom_minimum_size = Vector2(0, 42)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"DockButton"
|
||||
text = "C Character"
|
||||
alignment = 0
|
||||
metadata/screen_id = &"character"
|
||||
|
||||
[node name="QuestLog" type="Button" parent="Menu"]
|
||||
custom_minimum_size = Vector2(0, 42)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"DockButton"
|
||||
text = "J Quest Log"
|
||||
alignment = 0
|
||||
metadata/screen_id = &"quest_log"
|
||||
|
||||
[node name="Spellbook" type="Button" parent="Menu"]
|
||||
custom_minimum_size = Vector2(0, 42)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"DockButton"
|
||||
text = "K Spellbook"
|
||||
alignment = 0
|
||||
metadata/screen_id = &"spellbook"
|
||||
|
||||
[node name="WorldMap" type="Button" parent="Menu"]
|
||||
custom_minimum_size = Vector2(0, 42)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"DockButton"
|
||||
text = "M World Map"
|
||||
alignment = 0
|
||||
metadata/screen_id = &"world_map"
|
||||
|
||||
[node name="Party" type="Button" parent="Menu"]
|
||||
custom_minimum_size = Vector2(0, 42)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"DockButton"
|
||||
text = "P Party"
|
||||
alignment = 0
|
||||
metadata/screen_id = &"party"
|
||||
|
||||
[node name="Handle" type="Button" parent="."]
|
||||
custom_minimum_size = Vector2(26, 104)
|
||||
layout_mode = 1
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -222.0
|
||||
offset_top = -52.0
|
||||
offset_right = -196.0
|
||||
offset_bottom = 52.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
theme_type_variation = &"TabActive"
|
||||
text = "›"
|
||||
|
||||
Reference in New Issue
Block a user