Added disconnect button back

This commit is contained in:
desktop 2020-12-10 00:26:43 +01:00
parent 056c040878
commit 9005ad2ac7
6 changed files with 44 additions and 13 deletions

View file

@ -22,17 +22,17 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.27203, 0 )
transform = Transform( 1, 0, 0, 0, -1.62921e-07, 1, 0, -1, -1.62921e-07, 0, 1.5, 0 )
shape = SubResource( 1 )
[node name="Throne" parent="." index="7" instance=ExtResource( 3 )]
[node name="Throne" parent="." index="6" instance=ExtResource( 3 )]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0, 0.989432, 0 )
[node name="FrontLeft" parent="." index="8" instance=ExtResource( 4 )]
[node name="FrontLeft" parent="." index="7" instance=ExtResource( 4 )]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0.918807, 0, -0.312819 )
[node name="FrontRight" parent="." index="9" instance=ExtResource( 4 )]
[node name="FrontRight" parent="." index="8" instance=ExtResource( 4 )]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, -0.919, 0, -0.313 )
[node name="BackLeft" parent="." index="10" instance=ExtResource( 4 )]
[node name="BackLeft" parent="." index="9" instance=ExtResource( 4 )]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0.918807, 0, 0.7619 )
[node name="BackRight" parent="." index="11" instance=ExtResource( 4 )]
[node name="BackRight" parent="." index="10" instance=ExtResource( 4 )]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, -0.919, 0, 0.761719 )

Binary file not shown.

View file

@ -1,4 +1,12 @@
extends Control
onready var game = get_parent().get_parent()
func _ready():
var dir = Directory.new()
dir.open("res://Assets/Characters/")
#$CenterContainer/VBoxContainer/CharacterList.add_child(null)
func spawn():
get_parent().get_parent().spawn(get_tree().get_network_unique_id())

View file

@ -21,28 +21,46 @@ __meta__ = {
}
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = -146.0
margin_left = -177.0
margin_top = -50.0
margin_right = 146.0
margin_right = 176.0
margin_bottom = 50.0
[node name="CharacterList" type="HBoxContainer" parent="CenterContainer/VBoxContainer"]
margin_right = 292.0
margin_right = 353.0
margin_bottom = 48.0
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Button" type="Button" parent="CenterContainer/VBoxContainer/CharacterList"]
margin_right = 292.0
margin_left = 30.0
margin_right = 322.0
margin_bottom = 48.0
text = "Her Majesty the Queen"
[node name="SelectButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_left = 102.0
[node name="Options" type="HBoxContainer" parent="CenterContainer/VBoxContainer"]
margin_top = 52.0
margin_right = 190.0
margin_right = 353.0
margin_bottom = 100.0
alignment = 1
[node name="SelectButton" type="Button" parent="CenterContainer/VBoxContainer/Options"]
margin_right = 88.0
margin_bottom = 48.0
size_flags_horizontal = 4
text = "Select"
[connection signal="pressed" from="CenterContainer/VBoxContainer/SelectButton" to="." method="spawn"]
[node name="OptionsButton" type="Button" parent="CenterContainer/VBoxContainer/Options"]
margin_left = 92.0
margin_right = 199.0
margin_bottom = 48.0
text = "Options"
[node name="DisconnectButton" type="Button" parent="CenterContainer/VBoxContainer/Options"]
margin_left = 203.0
margin_right = 353.0
margin_bottom = 48.0
text = "Disconnect"
[connection signal="pressed" from="CenterContainer/VBoxContainer/Options/SelectButton" to="." method="spawn"]

View file

@ -209,6 +209,8 @@ func free_client():
get_tree().network_peer = null
local_player = null
return_to_menu("MainMenu")
func quit():
get_tree().quit()

View file

@ -300,6 +300,7 @@ alignment = 1
[connection signal="pressed" from="MenuContainer/MainMenu/Disconnect" to="." method="free_client"]
[connection signal="pressed" from="MenuContainer/MainMenu/Options" to="." method="open_menu" binds= [ "OptionsMenu" ]]
[connection signal="pressed" from="MenuContainer/MainMenu/Quit" to="." method="quit"]
[connection signal="pressed" from="MenuContainer/CharacterSelectScreen/CenterContainer/VBoxContainer/Options/DisconnectButton" to="." method="free_client"]
[connection signal="pressed" from="MenuContainer/ConnectMenu/Back" to="." method="return_to_menu" binds= [ "MainMenu" ]]
[connection signal="text_changed" from="MenuContainer/ConnectMenu/Destination/IPAdress" to="." method="set_ip"]
[connection signal="pressed" from="MenuContainer/ConnectMenu/NetworkType/Host" to="." method="initialize_server"]
@ -315,3 +316,5 @@ alignment = 1
[connection signal="value_changed" from="MenuContainer/ControlsMenu/HBoxContainer/SensitivitySlider" to="." method="set_mouse_sensitivity"]
[connection signal="pressed" from="MenuContainer/GraphicsMenu/Back" to="." method="return_to_menu" binds= [ "OptionsMenu" ]]
[connection signal="toggled" from="MenuContainer/GraphicsMenu/Fullscreen" to="." method="set_fullscreen"]
[editable path="MenuContainer/CharacterSelectScreen"]