b3227f5b78
- main_menu.gd: Play button now navigates to world_list.tscn
- world_list.gd: fix invalid theme_override_constants property-path syntax
(use add_theme_constant_override), fix @onready node paths missing
/HeaderHBox/, cast Variant dict values to String to avoid type-inference
errors when cards actually render
- world_list.tscn: wire up Back/Refresh button signal connections (scene
had zero [connection] blocks, buttons were dead)
- backend: fix real bug where World.visibility enum sent member names
("PUBLIC") to Postgres instead of lowercase values, breaking both GET
and POST /api/worlds/ for any real query
- backend: fix WorldResponse.created_at typed as str instead of datetime,
causing a second 500 on GET once the enum bug was fixed
- add smoke_test_world_list.gd: headless scene-level smoke test that
registers a user, instantiates the real scene, and confirms world cards
render from live backend data (not just an API-level check)
77 lines
2.1 KiB
Plaintext
77 lines
2.1 KiB
Plaintext
[gd_scene load_steps=2 format=3]
|
|
|
|
[ext_resource type="Script" path="res://scripts/world_list.gd" id="1_wl"]
|
|
|
|
[node name="WorldList" type="Control"]
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = ExtResource("1_wl")
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
|
layout_mode = 3
|
|
theme_override_constants/separation = 8
|
|
size_flags_horizontal = 4
|
|
size_flags_vertical = 4
|
|
|
|
[node name="HeaderHBox" type="HBoxContainer" parent="VBoxContainer"]
|
|
layout_mode = 3
|
|
size_flags_horizontal = 4
|
|
theme_override_constants/separation = 16
|
|
|
|
[node name="BackButton" type="Button" parent="VBoxContainer/HeaderHBox"]
|
|
layout_mode = 3
|
|
text = "< Back"
|
|
size_flags_horizontal = 0
|
|
|
|
[node name="TitleLabel" type="Label" parent="VBoxContainer/HeaderHBox"]
|
|
layout_mode = 3
|
|
text = "Browse Worlds"
|
|
horizontal_alignment = 1
|
|
size_flags_horizontal = 4
|
|
theme_override_font_sizes/font_size = 28
|
|
|
|
[node name="RefreshButton" type="Button" parent="VBoxContainer/HeaderHBox"]
|
|
layout_mode = 3
|
|
text = "Refresh"
|
|
size_flags_horizontal = 0
|
|
|
|
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
|
|
layout_mode = 3
|
|
size_flags_horizontal = 4
|
|
size_flags_vertical = 4
|
|
horizontal_mode = 2
|
|
vertical_mode = 2
|
|
|
|
[node name="WorldList" type="VBoxContainer" parent="VBoxContainer/ScrollContainer"]
|
|
layout_mode = 3
|
|
size_flags_horizontal = 4
|
|
size_flags_vertical = 4
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="LoadingLabel" type="Label" parent="VBoxContainer"]
|
|
layout_mode = 3
|
|
text = "Loading worlds..."
|
|
visible = false
|
|
horizontal_alignment = 1
|
|
theme_override_font_sizes/font_size = 18
|
|
|
|
[node name="ErrorLabel" type="Label" parent="VBoxContainer"]
|
|
layout_mode = 3
|
|
text = ""
|
|
visible = false
|
|
horizontal_alignment = 1
|
|
theme_override_font_sizes/font_size = 18
|
|
|
|
[node name="EmptyLabel" type="Label" parent="VBoxContainer"]
|
|
layout_mode = 3
|
|
text = ""
|
|
visible = false
|
|
horizontal_alignment = 1
|
|
theme_override_font_sizes/font_size = 18
|
|
|
|
[connection signal="pressed" from="VBoxContainer/HeaderHBox/BackButton" to="." method="_on_back_button_pressed"]
|
|
[connection signal="pressed" from="VBoxContainer/HeaderHBox/RefreshButton" to="." method="_on_refresh_button_pressed"]
|