From e92890c61f53538c64e2dcc1978a2a8b34b5a395 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 24 Mar 2020 00:56:19 +0100 Subject: [PATCH] Experimental automatic load, and renamed a few buttons. --- game/scenes/CharacterSelectorMenu.gd | 5 +++++ game/scenes/Menu.tscn | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/game/scenes/CharacterSelectorMenu.gd b/game/scenes/CharacterSelectorMenu.gd index a3deb72c..b274b3c9 100644 --- a/game/scenes/CharacterSelectorMenu.gd +++ b/game/scenes/CharacterSelectorMenu.gd @@ -31,6 +31,8 @@ export(NodePath) var load_button_path : NodePath export(NodePath) var renounce_button_path : NodePath export(NodePath) var create_button_path : NodePath +export(bool) var automatic_character_load : bool = false + var container : Node var player_display_container_node : Node @@ -108,6 +110,9 @@ func refresh(): get_node(load_button_path).show() get_node(create_button_path).hide() get_node(renounce_button_path).show() + + if (automatic_character_load): + load_character() else: get_node(container_path).hide() get_node(load_button_path).hide() diff --git a/game/scenes/Menu.tscn b/game/scenes/Menu.tscn index 6b2fccd0..1c2caefb 100644 --- a/game/scenes/Menu.tscn +++ b/game/scenes/Menu.tscn @@ -113,9 +113,9 @@ player_display_container_path = NodePath("../Char/CharacterDisplay") character_button_group = ExtResource( 4 ) character_entry = ExtResource( 2 ) character_folder = "characters" -load_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Load") +load_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Continue") renounce_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Renounce") -create_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Create") +create_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/New") [node name="CharacterSelector" type="MarginContainer" parent="CharacterSelectorMenu"] anchor_left = 1.0 @@ -156,11 +156,11 @@ margin_bottom = 106.0 margin_right = 261.0 size_flags_horizontal = 3 -[node name="Load" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] +[node name="Continue" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] margin_top = 8.0 margin_right = 261.0 margin_bottom = 34.269 -text = "Load" +text = "Continue" [node name="Renounce" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] margin_top = 42.0 @@ -170,13 +170,13 @@ size_flags_horizontal = 3 size_flags_vertical = 3 text = "Renounce" -[node name="Create" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] +[node name="New" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] margin_top = 76.0 margin_right = 261.0 margin_bottom = 102.269 size_flags_horizontal = 3 size_flags_vertical = 3 -text = "Create" +text = "New" [node name="PlayerDisplays" type="Node" parent="CharacterSelectorMenu"] @@ -587,9 +587,9 @@ light_energy = 0.87 light_specular = 0.65 shadow_bias = 0.07 script = ExtResource( 19 ) -[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Load" to="CharacterSelectorMenu" method="load_character"] +[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Continue" to="CharacterSelectorMenu" method="load_character"] [connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Renounce" to="CharacterSelectorMenu" method="renounce_character"] -[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Create" to="." method="switch_to_menu" binds= [ 1 ]] +[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/New" to="." method="switch_to_menu" binds= [ 1 ]] [connection signal="pressed" from="CharacterCreationMenu/CharacterSelector2/CharacterSelector/VBoxContainer/PanelContainer/VBoxContainer/Create" to="CharacterCreationMenu" method="create"] [connection signal="pressed" from="CharacterCreationMenu/CharacterSelector2/CharacterSelector/VBoxContainer/PanelContainer/VBoxContainer/Back" to="." method="switch_to_menu" binds= [ 0 ]] [connection signal="pressed" from="ConnectMenu/PanelContainer/VBoxContainer/Button2" to="ConnectMenu" method="hide"]