boot/: opening_screen (attribution -> title/flavor text placeholder, explicitly marked TODO for a later real cinematic, skippable by keypress/click) -> main_menu (Neues Spiel/Fortsetzen/Optionen/Credits/ Beenden, ConfirmationDialog for overwrite-existing-save) -> options_menu (TabContainer with 4 empty placeholder categories: Grafik/Sound/ Steuerung/Spieloptionen) and credits_screen, both just navigable stubs. project.godot's run/main_scene now points at boot/opening_screen.tscn instead of directly at the gameplay scene. autoload/save_manager.gd: new SaveManager singleton. Deliberately minimal — persists only a timestamp to user://savegame.json — but a real, working has_save()/save_game()/load_game()/start_new_game() round trip, enough to back the menu's Start/Continue/overwrite-confirm logic without inventing game state that doesn't exist yet. player/equipment/: Equipment (Node) + EquipmentItem (Resource) stub classes per the user's explicit ask for a "class diagram skeleton" to build on later — exported fields and empty TODO methods, no logic. Wired as a child of world/island.tscn's real Player (not player.tscn, which is only a debug prototype scene, not the actual game's player). player.gd's new `equipment` onready var uses get_node_or_null() since that child only exists on the real player, not every scene reusing this script. Verified headless: all new boot scenes load cleanly, a full boot smoke test via run/main_scene succeeds, and — since button-click navigation can't be simulated headlessly — SaveManager's actual save/load/ overwrite/cleanup cycle was exercised directly and behaves correctly (has_save flips true/false correctly, loaded data matches what was saved). Manual in-editor check of the menu navigation itself is still needed and not yet done.
66 lines
1.6 KiB
Plaintext
66 lines
1.6 KiB
Plaintext
[gd_scene format=3]
|
|
|
|
[ext_resource type="Script" path="res://boot/main_menu.gd" id="1_menu"]
|
|
|
|
[node name="MainMenu" type="Control"]
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = ExtResource("1_menu")
|
|
|
|
[node name="Panel" type="Panel" parent="."]
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -160.0
|
|
offset_top = -190.0
|
|
offset_right = 160.0
|
|
offset_bottom = 190.0
|
|
|
|
[node name="TitleLabel" type="Label" parent="Panel"]
|
|
anchor_right = 1.0
|
|
offset_top = 10.0
|
|
offset_bottom = 60.0
|
|
text = "WayfarersWanderer"
|
|
horizontal_alignment = 1
|
|
vertical_alignment = 1
|
|
|
|
[node name="ButtonList" type="VBoxContainer" parent="Panel"]
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_left = 20.0
|
|
offset_top = 70.0
|
|
offset_right = -20.0
|
|
offset_bottom = -20.0
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="StartButton" type="Button" parent="Panel/ButtonList"]
|
|
layout_mode = 2
|
|
text = "Neues Spiel"
|
|
|
|
[node name="ContinueButton" type="Button" parent="Panel/ButtonList"]
|
|
layout_mode = 2
|
|
text = "Fortsetzen"
|
|
|
|
[node name="OptionsButton" type="Button" parent="Panel/ButtonList"]
|
|
layout_mode = 2
|
|
text = "Optionen"
|
|
|
|
[node name="CreditsButton" type="Button" parent="Panel/ButtonList"]
|
|
layout_mode = 2
|
|
text = "Credits"
|
|
|
|
[node name="ExitButton" type="Button" parent="Panel/ButtonList"]
|
|
layout_mode = 2
|
|
text = "Beenden"
|
|
|
|
[node name="OverwriteConfirmDialog" type="ConfirmationDialog" parent="."]
|
|
title = "Spielstand überschreiben?"
|
|
initial_position = 1
|
|
dialog_text = "Ein Spielstand existiert bereits. Trotzdem überschreiben?"
|
|
ok_button_text = "Ja"
|
|
cancel_button_text = "Nein"
|