Issue 336 (#380)

Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
Co-authored-by: dploeger <dploeger@users.noreply.github.com>
This commit is contained in:
Dennis Ploeger
2021-08-30 20:57:25 +02:00
committed by GitHub
parent 3b36031f24
commit 3dc779311c
35 changed files with 389 additions and 254 deletions

View File

@@ -1,13 +1,13 @@
:look
> [eq dialog_advance 0]
say player "I don't know what that stuff is."
say player ROOM1_look_wall_item_1:"I don't know what that stuff is."
set_global dialog_advance 1
stop
> [eq dialog_advance 1]
say player "I REALLY don't know what that stuff is."
say player ROOM1_look_wall_item_2:"I REALLY don't know what that stuff is."
set_global dialog_advance 2
stop
> [eq dialog_advance 2]
say player "No, SERIOUSLY, I have no idea what that is!"
say player "Please stop asking me that!"
say player ROOM1_look_wall_item_3:"No, SERIOUSLY, I have no idea what that is!"
say player ROOM1_look_wall_item_4:"Please stop asking me that!"
stop

View File

@@ -1,13 +1,13 @@
:look
> [eq dialog_popup_advance 0]
say player "I don't know what that stuff is." dialog_box_inset
say player ROOM1_look_wall_item_1:"I don't know what that stuff is." dialog_box_inset
set_global dialog_popup_advance 1
stop
> [eq dialog_popup_advance 1]
say player "I REALLY don't know what that stuff is." dialog_box_inset
say player ROOM1_look_wall_item_2:"I REALLY don't know what that stuff is." dialog_box_inset
set_global dialog_popup_advance 2
stop
> [eq dialog_popup_advance 2]
say player "No, SERIOUSLY, I have no idea what that is!" dialog_box_inset
say player "Please stop asking me that!" dialog_box_inset
say player ROOM1_look_wall_item_3:"No, SERIOUSLY, I have no idea what that is!" dialog_box_inset
say player ROOM1_look_wall_item_4:"Please stop asking me that!" dialog_box_inset
stop

View File

@@ -13,7 +13,7 @@ say player "I don't think he'd like that."
set_global talked_once true
? res://game/characters/mark/mark_talk.tscn 5 1
- "What are you doing here?"
- ROOM6_dialog_1:"What are you doing here?"
say player "What are you doing here?"
say worker "I'm working! Can't you see that?"
say worker "My colleague is supposed to bring me an important report. And he's not coming!"
@@ -28,7 +28,7 @@ say player "I don't think he'd like that."
say worker "Eh! I'm not asking you anythin'!"
stop
!
- "I'm selling these fine leather jackets."
- ROOM6_dialog_2:"I'm selling these fine leather jackets."
say player "I'm selling these fine leather jackets."
say worker "Go away, kid."
stop

View File

@@ -1,5 +1,7 @@
keys,en,fr
ROOM1_look_wall_item_1,"I don't know what that stuff is.","Je ne sais pas ce que c'est."
ROOM1_look_wall_item_2,"I REALLY don't know what that stuff is.","Je ne sais VRAIMENT pas ce que c'est."
ROOM1_look_wall_item_3,"No, SERIOUSLY, I have no idea what that is!","Non, SÉRIEUSEMENT, je n'ai aucune idée de ce que c'est !"
ROOM1_look_wall_item_4,"Please stop asking me that!","Arrêtez de me demander !"
keys,en,fr,de
ROOM1_look_wall_item_1,"I don't know what that stuff is.","Je ne sais pas ce que c'est.","Ich habe keine Ahnung, was das ist."
ROOM1_look_wall_item_2,"I REALLY don't know what that stuff is.","Je ne sais VRAIMENT pas ce que c'est.","Ich habe WIRKLICH keine Ahnung, was das ist!"
ROOM1_look_wall_item_3,"No, SERIOUSLY, I have no idea what that is!","Non, SÉRIEUSEMENT, je n'ai aucune idée de ce que c'est !","IM ERNST! Ich habe keine Ahnung, was das ist!"
ROOM1_look_wall_item_4,"Please stop asking me that!","Arrêtez de me demander !","Bite hör' auf, mich danach zu fragen!"
ROOM6_dialog_1,"What are you doing here?","Que faites-vous ici ?","Was machst Du hier?"
ROOM6_dialog_2,"I'm selling these fine leather jackets.", "Je vends ces superbes blousons en cuir.","Ich verkaufe diese schicken Lederjacken."
1 keys en fr de
2 ROOM1_look_wall_item_1 I don't know what that stuff is. Je ne sais pas ce que c'est. Ich habe keine Ahnung, was das ist.
3 ROOM1_look_wall_item_2 I REALLY don't know what that stuff is. Je ne sais VRAIMENT pas ce que c'est. Ich habe WIRKLICH keine Ahnung, was das ist!
4 ROOM1_look_wall_item_3 No, SERIOUSLY, I have no idea what that is! Non, SÉRIEUSEMENT, je n'ai aucune idée de ce que c'est ! IM ERNST! Ich habe keine Ahnung, was das ist!
5 ROOM1_look_wall_item_4 Please stop asking me that! Arrêtez de me demander ! Bite hör' auf, mich danach zu fragen!
6 ROOM6_dialog_1 What are you doing here? Que faites-vous ici ? Was machst Du hier?
7 ROOM6_dialog_2 I'm selling these fine leather jackets. Je vends ces superbes blousons en cuir. Ich verkaufe diese schicken Lederjacken.

Binary file not shown.

View File

@@ -1,17 +1,19 @@
keys,en,fr
NEW_GAME,New game,Nouvelle partie
LOAD_GAME,Load game,Charger
OPTIONS,Options,Options
QUIT,Quit,Quitter
OPTIONS_BACK,Back,Retour
OPTIONS_LANGUAGE,Language,Langue
GENERAL_VOLUME,General,Général
MUSIC_VOLUME,Music,Musique
SOUND_VOLUME,Sound effects,Effets sonores
CANCEL,Cancel,Annuler
OK,OK,OK
ENTER_SAVE_NAME,Enter the save name:,Entrez un nom de sauvegarde
APPLY,Apply,Appliquer
CONFIRM_OVERWRITE,Overwrite the savegame?,Écraser la sauvegarde ?
YES,Yes,Oui
NO,No,Non
keys,en,fr,de
NEW_GAME,New game,Nouvelle partie,Neues Spiel
CONTINUE_GAME,Continue game,Continuer la partie,Weiterspielen
LOAD_GAME,Load game,Charger,Spiel laden
SAVE_GAME,Save game,Sauvegarder,Spiel speichern
OPTIONS,Options,Options,Einstellungen
QUIT,Quit,Quitter,Beenden
OPTIONS_BACK,Back,Retour,Zurück
OPTIONS_LANGUAGE,Language,Langue,Sprache
GENERAL_VOLUME,General,Général,Allgemein
MUSIC_VOLUME,Music,Musique,Musik
SOUND_VOLUME,Sound effects,Effets sonores,Soundeffekte
CANCEL,Cancel,Annuler,Abbrechen
OK,OK,Ok,Ok
ENTER_SAVE_NAME,Enter the save name:,Entrez un nom de sauvegarde,Bitte gib einen Namen für das Spiel ein:
APPLY,Apply,Appliquer,Anwenden
CONFIRM_OVERWRITE,Overwrite the savegame?,Écraser la sauvegarde ?,Soll das Spiel überschrieben werden?
YES,Yes,Oui,Ja
NO,No,Non,Nein
1 keys en fr de
2 NEW_GAME New game Nouvelle partie Neues Spiel
3 LOAD_GAME CONTINUE_GAME Load game Continue game Charger Continuer la partie Weiterspielen
4 OPTIONS LOAD_GAME Options Load game Options Charger Spiel laden
5 QUIT SAVE_GAME Quit Save game Quitter Sauvegarder Spiel speichern
6 OPTIONS_BACK OPTIONS Back Options Retour Options Einstellungen
7 OPTIONS_LANGUAGE QUIT Language Quit Langue Quitter Beenden
8 GENERAL_VOLUME OPTIONS_BACK General Back Général Retour Zurück
9 MUSIC_VOLUME OPTIONS_LANGUAGE Music Language Musique Langue Sprache
10 SOUND_VOLUME GENERAL_VOLUME Sound effects General Effets sonores Général Allgemein
11 CANCEL MUSIC_VOLUME Cancel Music Annuler Musique Musik
12 OK SOUND_VOLUME OK Sound effects OK Effets sonores Soundeffekte
13 ENTER_SAVE_NAME CANCEL Enter the save name: Cancel Entrez un nom de sauvegarde Annuler Abbrechen
14 APPLY OK Apply OK Appliquer Ok Ok
15 CONFIRM_OVERWRITE ENTER_SAVE_NAME Overwrite the savegame? Enter the save name: Écraser la sauvegarde ? Entrez un nom de sauvegarde Bitte gib einen Namen für das Spiel ein:
16 YES APPLY Yes Apply Oui Appliquer Anwenden
17 NO CONFIRM_OVERWRITE No Overwrite the savegame? Non Écraser la sauvegarde ? Soll das Spiel überschrieben werden?
18 YES Yes Oui Ja
19 NO No Non Nein

Binary file not shown.

View File

@@ -14,13 +14,17 @@ func _on_back_pressed():
emit_signal("back_button_pressed")
func refresh_savegames():
for slot in $ScrollContainer/slots.get_children():
$ScrollContainer/slots.remove_child(slot)
for slot in $CenterContainer/VBoxContainer/\
ScrollContainer/slots.get_children():
$CenterContainer/VBoxContainer/\
ScrollContainer/slots.remove_child(slot)
var saves_list = escoria.save_manager.get_saves_list()
for i in saves_list.size():
var save_data = saves_list[i+1]
var new_slot = slot_ui_scene.instance()
$ScrollContainer/slots.add_child(new_slot)
$CenterContainer/VBoxContainer/ScrollContainer/slots.add_child(
new_slot
)
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
new_slot.connect("pressed", self, "_on_slot_pressed", [i+1])

View File

@@ -13,38 +13,48 @@ __meta__ = {
}
slot_ui_scene = ExtResource( 2 )
[node name="back" type="Button" parent="."]
margin_left = 130.0
margin_top = 329.0
margin_right = 304.0
margin_bottom = 383.0
custom_fonts/font = ExtResource( 1 )
text = "OPTIONS_BACK"
[node name="CenterContainer" type="CenterContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ScrollContainer" type="ScrollContainer" parent="."]
anchor_left = 0.291
anchor_top = 0.369
anchor_right = 0.709
anchor_bottom = 0.941
margin_left = -0.480011
margin_top = -1.10001
margin_right = 0.479919
margin_bottom = -0.900024
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = 390.0
margin_top = 184.0
margin_right = 890.0
margin_bottom = 715.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ScrollContainer" type="ScrollContainer" parent="CenterContainer/VBoxContainer"]
margin_right = 500.0
margin_bottom = 500.0
rect_min_size = Vector2( 500, 500 )
scroll_horizontal_enabled = false
__meta__ = {
"_edit_use_anchors_": false
}
[node name="slots" type="VBoxContainer" parent="ScrollContainer"]
margin_right = 536.0
margin_bottom = 515.0
[node name="slots" type="VBoxContainer" parent="CenterContainer/VBoxContainer/ScrollContainer"]
margin_right = 500.0
margin_bottom = 500.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="back" to="." method="_on_back_pressed"]
[node name="back" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 504.0
margin_right = 500.0
margin_bottom = 531.0
custom_fonts/font = ExtResource( 1 )
text = "OPTIONS_BACK"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="CenterContainer/VBoxContainer/back" to="." method="_on_back_pressed"]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -19,6 +19,7 @@ __meta__ = {
[node name="new_game" type="Button" parent="."]
margin_right = 358.0
margin_bottom = 152.0
rect_min_size = Vector2( 0, 150 )
size_flags_vertical = 3
custom_fonts/font = ExtResource( 1 )
text = "NEW_GAME"

View File

@@ -19,7 +19,7 @@ func _ready():
]
)
return false
func _on_continue_pressed():
pass
@@ -34,13 +34,13 @@ func _on_new_game_pressed():
func _on_load_game_pressed():
$Panel/main.hide()
$Panel/CenterContainer/main.hide()
$Panel/load_game.refresh_savegames()
$Panel/load_game.show()
func _on_options_pressed():
$Panel/main.hide()
$Panel/CenterContainer/main.hide()
$Panel/options.show()
@@ -53,10 +53,10 @@ func _on_quit_pressed():
func _on_options_back_button_pressed():
$Panel/options.hide()
$Panel/main.show()
$Panel/CenterContainer/main.show()
func _on_load_game_back_button_pressed():
$Panel/load_game.hide()
$Panel/main.show()
$Panel/CenterContainer/main.show()

View File

@@ -22,19 +22,46 @@ __meta__ = {
"_editor_description_": ""
}
[node name="TextureRect" type="TextureRect" parent="Panel"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -308.0
margin_top = 52.0
margin_right = 308.0
margin_bottom = 288.0
[node name="CenterContainer" type="CenterContainer" parent="Panel"]
anchor_right = 1.0
anchor_bottom = 1.0
[node name="main" type="VBoxContainer" parent="Panel/CenterContainer"]
margin_left = 332.0
margin_top = 150.0
margin_right = 948.0
margin_bottom = 749.0
custom_constants/separation = 100
[node name="TextureRect" type="TextureRect" parent="Panel/CenterContainer/main"]
margin_right = 616.0
margin_bottom = 236.0
texture = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="main" parent="Panel" instance=ExtResource( 2 )]
[node name="buttons" parent="Panel/CenterContainer/main" instance=ExtResource( 2 )]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 0.0
margin_top = 336.0
margin_right = 616.0
margin_bottom = 599.0
[node name="new_game" parent="Panel/CenterContainer/main/buttons" index="0"]
margin_right = 616.0
[node name="load_game" parent="Panel/CenterContainer/main/buttons" index="1"]
margin_right = 616.0
[node name="options" parent="Panel/CenterContainer/main/buttons" index="2"]
margin_right = 616.0
[node name="quit" parent="Panel/CenterContainer/main/buttons" index="3"]
margin_right = 616.0
[node name="options" parent="Panel" instance=ExtResource( 4 )]
visible = false
@@ -42,11 +69,11 @@ visible = false
[node name="load_game" parent="Panel" instance=ExtResource( 5 )]
visible = false
[connection signal="pressed" from="Panel/main/new_game" to="." method="_on_new_game_pressed"]
[connection signal="pressed" from="Panel/main/load_game" to="." method="_on_load_game_pressed"]
[connection signal="pressed" from="Panel/main/options" to="." method="_on_options_pressed"]
[connection signal="pressed" from="Panel/main/quit" to="." method="_on_quit_pressed"]
[connection signal="pressed" from="Panel/CenterContainer/main/buttons/new_game" to="." method="_on_new_game_pressed"]
[connection signal="pressed" from="Panel/CenterContainer/main/buttons/load_game" to="." method="_on_load_game_pressed"]
[connection signal="pressed" from="Panel/CenterContainer/main/buttons/options" to="." method="_on_options_pressed"]
[connection signal="pressed" from="Panel/CenterContainer/main/buttons/quit" to="." method="_on_quit_pressed"]
[connection signal="back_button_pressed" from="Panel/options" to="." method="_on_options_back_button_pressed"]
[connection signal="back_button_pressed" from="Panel/load_game" to="." method="_on_load_game_back_button_pressed"]
[editable path="Panel/main"]
[editable path="Panel/CenterContainer/main/buttons"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -6,6 +6,29 @@ onready var settings_changed = false
var backup_settings
# A list of languages already added to the language selection
var _loaded_languages: Array = []
func _ready() -> void:
var _flags_container: HBoxContainer = \
$CenterContainer/VBoxContainer/MarginContainer/options/flags
for child in _flags_container.get_children():
_flags_container.remove_child(child)
_loaded_languages = []
for lang in TranslationServer.get_loaded_locales():
if not lang in _loaded_languages:
_loaded_languages.append(lang)
var _lang = TextureRect.new()
_lang.texture = load(
"res://game/ui/commons/options/flags/%s.png" % lang
)
_flags_container.add_child(_lang)
_lang.connect("gui_input", self, "_on_language_input", [lang])
func show():
backup_settings = escoria.settings.duplicate()
initialize_options(escoria.settings)
@@ -13,13 +36,10 @@ func show():
func initialize_options(p_settings):
$options/general_volume.value = p_settings["master_volume"]
$options/sound_volume.value = p_settings["sfx_volume"]
$options/music_volume.value = p_settings["music_volume"]
func greyout_other_languages(_except_lang: String) -> void:
pass
var _options = $CenterContainer/VBoxContainer/MarginContainer/options
_options.get_node("general_volume").value = p_settings["master_volume"]
_options.get_node("sound_volume").value = p_settings["sfx_volume"]
_options.get_node("music_volume").value = p_settings["music_volume"]
func _on_language_input(event: InputEvent, language: String):

View File

@@ -1,8 +1,6 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=1]
[ext_resource path="res://game/ui/commons/main_menu/flags/en_EN_small.png" type="Texture" id=2]
[ext_resource path="res://game/ui/commons/main_menu/flags/fr_FR_small.png" type="Texture" id=3]
[ext_resource path="res://game/ui/commons/options/options.gd" type="Script" id=4]
[node name="options" type="Control"]
@@ -13,133 +11,139 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="back" type="Button" parent="."]
margin_left = 130.0
margin_top = 329.0
margin_right = 304.0
margin_bottom = 383.0
custom_fonts/font = ExtResource( 1 )
text = "OPTIONS_BACK"
[node name="CenterContainer" type="CenterContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = 482.0
margin_top = 366.0
margin_right = 798.0
margin_bottom = 533.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="options" type="GridContainer" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -275.5
margin_top = -75.0
margin_right = 275.5
margin_bottom = 75.0
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer/VBoxContainer"]
margin_right = 316.0
margin_bottom = 136.0
size_flags_vertical = 6
custom_constants/margin_right = 20
custom_constants/margin_top = 20
custom_constants/margin_left = 20
custom_constants/margin_bottom = 20
[node name="options" type="GridContainer" parent="CenterContainer/VBoxContainer/MarginContainer"]
margin_left = 20.0
margin_top = 20.0
margin_right = 296.0
margin_bottom = 116.0
size_flags_vertical = 6
custom_constants/hseparation = 40
columns = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="label" type="Label" parent="options"]
margin_top = 27.0
[node name="label" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
margin_right = 220.0
margin_bottom = 48.0
margin_bottom = 21.0
custom_fonts/font = ExtResource( 1 )
text = "OPTIONS_LANGUAGE"
[node name="flags" type="HBoxContainer" parent="options"]
[node name="flags" type="HBoxContainer" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
margin_left = 260.0
margin_right = 553.0
margin_bottom = 75.0
margin_right = 276.0
margin_bottom = 21.0
size_flags_vertical = 3
custom_constants/separation = 30
alignment = 1
[node name="fr" type="TextureRect" parent="options/flags"]
margin_right = 113.0
margin_bottom = 75.0
texture = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="en" type="TextureRect" parent="options/flags"]
margin_left = 143.0
margin_right = 293.0
margin_bottom = 75.0
texture = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="label2" type="Label" parent="options"]
margin_top = 79.0
[node name="label2" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
margin_top = 25.0
margin_right = 220.0
margin_bottom = 100.0
margin_bottom = 46.0
custom_fonts/font = ExtResource( 1 )
text = "GENERAL_VOLUME"
[node name="general_volume" type="HSlider" parent="options"]
[node name="general_volume" type="HSlider" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
margin_left = 260.0
margin_top = 79.0
margin_right = 553.0
margin_bottom = 95.0
margin_top = 25.0
margin_right = 276.0
margin_bottom = 41.0
size_flags_horizontal = 3
min_value = 0.001
max_value = 1.0
step = 0.001
value = 0.001
[node name="label3" type="Label" parent="options"]
margin_top = 104.0
[node name="label3" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
margin_top = 50.0
margin_right = 220.0
margin_bottom = 125.0
margin_bottom = 71.0
custom_fonts/font = ExtResource( 1 )
text = "SOUND_VOLUME"
[node name="sound_volume" type="HSlider" parent="options"]
[node name="sound_volume" type="HSlider" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
margin_left = 260.0
margin_top = 104.0
margin_right = 553.0
margin_bottom = 120.0
margin_top = 50.0
margin_right = 276.0
margin_bottom = 66.0
size_flags_horizontal = 3
min_value = 0.001
max_value = 1.0
step = 0.001
value = 0.001
[node name="label4" type="Label" parent="options"]
margin_top = 129.0
[node name="label4" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
margin_top = 75.0
margin_right = 220.0
margin_bottom = 150.0
margin_bottom = 96.0
custom_fonts/font = ExtResource( 1 )
text = "MUSIC_VOLUME"
[node name="music_volume" type="HSlider" parent="options"]
[node name="music_volume" type="HSlider" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
margin_left = 260.0
margin_top = 129.0
margin_right = 553.0
margin_bottom = 145.0
margin_top = 75.0
margin_right = 276.0
margin_bottom = 91.0
size_flags_horizontal = 3
min_value = 0.001
max_value = 1.0
step = 0.001
value = 0.001
[node name="apply" type="Button" parent="."]
margin_left = 364.0
margin_top = 712.0
margin_right = 544.0
margin_bottom = 767.0
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer"]
margin_top = 140.0
margin_right = 316.0
margin_bottom = 167.0
custom_constants/separation = 20
alignment = 1
[node name="back" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"]
margin_left = 22.0
margin_right = 196.0
margin_bottom = 27.0
custom_fonts/font = ExtResource( 1 )
text = "OPTIONS_BACK"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="apply" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"]
margin_left = 216.0
margin_right = 293.0
margin_bottom = 27.0
custom_fonts/font = ExtResource( 1 )
text = "APPLY"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="back" to="." method="_on_back_pressed"]
[connection signal="gui_input" from="options/flags/fr" to="." method="_on_language_input" binds= [ "fr" ]]
[connection signal="gui_input" from="options/flags/en" to="." method="_on_language_input" binds= [ "en" ]]
[connection signal="value_changed" from="options/general_volume" to="." method="_on_general_volume_changed"]
[connection signal="value_changed" from="options/sound_volume" to="." method="_on_sound_volume_changed"]
[connection signal="value_changed" from="options/music_volume" to="." method="_on_music_volume_changed"]
[connection signal="pressed" from="apply" to="." method="_on_apply_pressed"]
[connection signal="value_changed" from="CenterContainer/VBoxContainer/MarginContainer/options/general_volume" to="." method="_on_general_volume_changed"]
[connection signal="value_changed" from="CenterContainer/VBoxContainer/MarginContainer/options/sound_volume" to="." method="_on_sound_volume_changed"]
[connection signal="value_changed" from="CenterContainer/VBoxContainer/MarginContainer/options/music_volume" to="." method="_on_music_volume_changed"]
[connection signal="pressed" from="CenterContainer/VBoxContainer/HBoxContainer/back" to="." method="_on_back_pressed"]
[connection signal="pressed" from="CenterContainer/VBoxContainer/HBoxContainer/apply" to="." method="_on_apply_pressed"]

View File

@@ -11,12 +11,12 @@ func _on_continue_pressed():
func _on_save_game_pressed():
$Panel/VBoxContainer.hide()
$Panel/CenterContainer/VBoxContainer.hide()
$save_game.show()
func _on_load_game_pressed():
$Panel/VBoxContainer.hide()
$Panel/CenterContainer/VBoxContainer.hide()
$load_game.refresh_savegames()
$load_game.show()
@@ -26,10 +26,10 @@ func _on_quit_pressed():
func _on_save_game_back_button_pressed():
$Panel/VBoxContainer.show()
$Panel/CenterContainer/VBoxContainer.show()
$save_game.hide()
func _on_load_game_back_button_pressed():
$Panel/VBoxContainer.show()
$Panel/CenterContainer/VBoxContainer.show()
$load_game.hide()

View File

@@ -21,70 +21,77 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="Panel"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -308.0
margin_right = 308.0
[node name="CenterContainer" type="CenterContainer" parent="Panel"]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/CenterContainer"]
margin_left = 332.0
margin_top = 151.0
margin_right = 948.0
margin_bottom = 748.0
custom_constants/separation = 100
[node name="TextureRect" type="TextureRect" parent="Panel/CenterContainer/VBoxContainer"]
margin_right = 616.0
margin_bottom = 236.0
texture = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -127.8
margin_top = -80.62
margin_right = 127.8
margin_bottom = 80.62
[node name="menuitems" type="VBoxContainer" parent="Panel/CenterContainer/VBoxContainer"]
margin_top = 336.0
margin_right = 616.0
margin_bottom = 597.0
custom_constants/separation = 10
__meta__ = {
"_edit_use_anchors_": false
}
[node name="continue" type="Button" parent="Panel/VBoxContainer"]
margin_right = 255.0
margin_bottom = 32.0
[node name="continue" type="Button" parent="Panel/CenterContainer/VBoxContainer/menuitems"]
margin_right = 616.0
margin_bottom = 150.0
rect_min_size = Vector2( 0, 150 )
size_flags_vertical = 3
custom_fonts/font = ExtResource( 2 )
text = "Continue"
text = "CONTINUE_GAME"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="save_game" type="Button" parent="Panel/VBoxContainer"]
margin_top = 42.0
margin_right = 255.0
margin_bottom = 75.0
[node name="save_game" type="Button" parent="Panel/CenterContainer/VBoxContainer/menuitems"]
margin_top = 160.0
margin_right = 616.0
margin_bottom = 187.0
size_flags_vertical = 3
custom_fonts/font = ExtResource( 2 )
text = "Save game"
text = "SAVE_GAME"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="load_game" type="Button" parent="Panel/VBoxContainer"]
margin_top = 85.0
margin_right = 255.0
margin_bottom = 118.0
[node name="load_game" type="Button" parent="Panel/CenterContainer/VBoxContainer/menuitems"]
margin_top = 197.0
margin_right = 616.0
margin_bottom = 224.0
size_flags_vertical = 3
custom_fonts/font = ExtResource( 2 )
text = "Load game"
text = "LOAD_GAME"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="quit" type="Button" parent="Panel/VBoxContainer"]
margin_top = 128.0
margin_right = 255.0
margin_bottom = 161.0
[node name="quit" type="Button" parent="Panel/CenterContainer/VBoxContainer/menuitems"]
margin_top = 234.0
margin_right = 616.0
margin_bottom = 261.0
size_flags_vertical = 3
custom_fonts/font = ExtResource( 2 )
text = "Quit"
text = "QUIT"
__meta__ = {
"_edit_use_anchors_": false
}
@@ -95,9 +102,9 @@ visible = false
[node name="load_game" parent="." instance=ExtResource( 5 )]
visible = false
[connection signal="pressed" from="Panel/VBoxContainer/continue" to="." method="_on_continue_pressed"]
[connection signal="pressed" from="Panel/VBoxContainer/save_game" to="." method="_on_save_game_pressed"]
[connection signal="pressed" from="Panel/VBoxContainer/load_game" to="." method="_on_load_game_pressed"]
[connection signal="pressed" from="Panel/VBoxContainer/quit" to="." method="_on_quit_pressed"]
[connection signal="pressed" from="Panel/CenterContainer/VBoxContainer/menuitems/continue" to="." method="_on_continue_pressed"]
[connection signal="pressed" from="Panel/CenterContainer/VBoxContainer/menuitems/save_game" to="." method="_on_save_game_pressed"]
[connection signal="pressed" from="Panel/CenterContainer/VBoxContainer/menuitems/load_game" to="." method="_on_load_game_pressed"]
[connection signal="pressed" from="Panel/CenterContainer/VBoxContainer/menuitems/quit" to="." method="_on_quit_pressed"]
[connection signal="back_button_pressed" from="save_game" to="." method="_on_save_game_back_button_pressed"]
[connection signal="back_button_pressed" from="load_game" to="." method="_on_load_game_back_button_pressed"]

View File

@@ -19,14 +19,15 @@ func _on_slot_pressed(p_slot_n: int):
func refresh_savegames():
for slot in $ScrollContainer/slots.get_children():
$ScrollContainer/slots.remove_child(slot)
var _slots = $CenterContainer/VBoxContainer/ScrollContainer/slots
for slot in _slots.get_children():
_slots.remove_child(slot)
var saves_list = escoria.save_manager.get_saves_list()
for i in saves_list.size():
var save_data = saves_list[i+1]
var new_slot = slot_ui_scene.instance()
$ScrollContainer/slots.add_child(new_slot)
_slots.add_child(new_slot)
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
new_slot.connect("pressed", self, "_on_slot_pressed", [i+1])
@@ -39,7 +40,7 @@ func refresh_savegames():
datetime["minute"],
]
var new_slot = slot_ui_scene.instance()
$ScrollContainer/slots.add_child(new_slot)
_slots.add_child(new_slot)
new_slot.set_slot_name_date(tr("New save"), datetime_string)
new_slot.connect("pressed", self, "_on_slot_pressed", [saves_list.size()+1])

View File

@@ -15,44 +15,51 @@ __meta__ = {
}
slot_ui_scene = ExtResource( 1 )
[node name="back" type="Button" parent="."]
margin_left = 130.0
margin_top = 329.0
margin_right = 304.0
margin_bottom = 383.0
custom_fonts/font = ExtResource( 3 )
text = "OPTIONS_BACK"
[node name="save_name_popup" parent="." instance=ExtResource( 4 )]
[node name="overwrite_confirm_popup" parent="." instance=ExtResource( 5 )]
[node name="CenterContainer" type="CenterContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ScrollContainer" type="ScrollContainer" parent="."]
anchor_left = 0.284
anchor_top = 0.367
anchor_right = 0.709
anchor_bottom = 0.94
margin_left = 8.47998
margin_top = 0.699982
margin_right = 0.479919
margin_bottom = -6.10352e-05
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = 390.0
margin_top = 184.0
margin_right = 890.0
margin_bottom = 715.0
[node name="ScrollContainer" type="ScrollContainer" parent="CenterContainer/VBoxContainer"]
margin_right = 500.0
margin_bottom = 500.0
rect_min_size = Vector2( 500, 500 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="slots" type="VBoxContainer" parent="ScrollContainer"]
margin_right = 536.0
margin_bottom = 515.0
[node name="slots" type="VBoxContainer" parent="CenterContainer/VBoxContainer/ScrollContainer"]
margin_right = 500.0
margin_bottom = 500.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="save_name_popup" parent="." instance=ExtResource( 4 )]
[node name="back" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 504.0
margin_right = 500.0
margin_bottom = 531.0
custom_fonts/font = ExtResource( 3 )
text = "OPTIONS_BACK"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="overwrite_confirm_popup" parent="." instance=ExtResource( 5 )]
[connection signal="pressed" from="back" to="." method="_on_back_pressed"]
[connection signal="savegame_cancel" from="save_name_popup" to="." method="_on_save_name_popup_savegame_cancel"]
[connection signal="savegame_name_ok" from="save_name_popup" to="." method="_on_save_name_popup_savegame_name_ok"]
[connection signal="confirm_yes" from="overwrite_confirm_popup" to="." method="_on_overwrite_confirm_popup_confirm_yes"]
[connection signal="pressed" from="CenterContainer/VBoxContainer/back" to="." method="_on_back_pressed"]