mirror of
https://github.com/deunix-educ/aventuriers-des-mots.git
synced 2026-10-13 02:11:58 +02:00
Add way back to profile selection and abandoning a mission
World map gets a "Changer de profil" button (saves first). During a mission, a header button asks for confirmation then leaves without stars or items; attempts already made stay recorded and are saved. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ var _viewed_level := "CE1"
|
||||
@onready var _level_toggle_button: Button = %LevelToggleButton
|
||||
@onready var _total_stars_label: Label = %TotalStarsLabel
|
||||
@onready var _collection_button: Button = %CollectionButton
|
||||
@onready var _profile_button: Button = %ProfileButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -24,6 +25,8 @@ func _ready() -> void:
|
||||
_level_toggle_button.pressed.connect(_on_level_toggle_pressed)
|
||||
_collection_button.text = UIText.get_text("world_map.collection_button")
|
||||
_collection_button.pressed.connect(_on_collection_pressed)
|
||||
_profile_button.text = UIText.get_text("world_map.change_profile_button")
|
||||
_profile_button.pressed.connect(_on_change_profile_pressed)
|
||||
_refresh()
|
||||
|
||||
|
||||
@@ -49,6 +52,13 @@ func _populate_missions() -> void:
|
||||
_map_area.add_child(_build_marker(mission))
|
||||
|
||||
|
||||
## Revient au choix du profil sans rien perdre : la progression est ecrite
|
||||
## avant de quitter la carte (le profil se rechargera a la prochaine selection).
|
||||
func _on_change_profile_pressed() -> void:
|
||||
ProgressManager.save_now()
|
||||
GameManager.goto(GameManager.SCENE_PROFILE_SELECT)
|
||||
|
||||
|
||||
func _on_collection_pressed() -> void:
|
||||
GameManager.goto(GameManager.SCENE_COLLECTION)
|
||||
|
||||
|
||||
@@ -56,6 +56,11 @@ unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
|
||||
[node name="ProfileButton" type="Button" parent="VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
|
||||
[node name="Guide" type="Control" parent="VBox" instance=ExtResource("2")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
Reference in New Issue
Block a user