Added compatibility for new server restart feature #6

Merged
TechieDamien merged 1 commits from restart into master 2021-07-24 17:02:16 +00:00
3 changed files with 27 additions and 2 deletions

View File

@ -35,4 +35,26 @@ autoplay = true
bus = "Music" bus = "Music"
script = ExtResource( 4 ) script = ExtResource( 4 )
[node name="DisconnectDialog" type="PopupDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -130.0
margin_top = -30.0
margin_right = 130.0
margin_bottom = 30.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="DisconnectDialog"]
anchor_right = 1.0
anchor_bottom = 1.0
text = "Too many players disconnected
Game is cancelled"
align = 1
valign = 1
uppercase = true
[connection signal="finished" from="AudioStreamPlayer" to="AudioStreamPlayer" method="_on_finished"] [connection signal="finished" from="AudioStreamPlayer" to="AudioStreamPlayer" method="_on_finished"]

View File

@ -92,6 +92,8 @@ func exit_button_pressed():
remote func exit_requested(): remote func exit_requested():
switch_to_lobby() switch_to_lobby()
remote func server_exit_requested() -> void:
switch_to_lobby()
$DisconnectDialog.popup()

View File

@ -54,7 +54,8 @@ ui_select={
} }
ui_cancel={ ui_cancel={
"deadzone": 0.5, "deadzone": 0.5,
"events": [ ] "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
]
} }
ui_focus_next={ ui_focus_next={
"deadzone": 0.5, "deadzone": 0.5,