Skip to content

Commit

Permalink
Fix issue with disconnected signals
Browse files Browse the repository at this point in the history
  • Loading branch information
oerc0122 committed Mar 23, 2021
1 parent aee7669 commit 5c5653c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions UI/TopMenu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func _on_FileMenu_id_pressed(id: int) -> void:
$FileDialog.window_title = "Load game"
$FileDialog.popup_centered()
yield($FileDialog, "popup_hide")
print(self.file_loc)
if self.file_loc:
emit_signal("load_game", self.file_loc)
self.file_loc = ""
Expand Down
2 changes: 1 addition & 1 deletion UI/TopMenu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -452,4 +452,4 @@ margin_bottom = 184.0
rect_min_size = Vector2( 400, 140 )
filters = PoolStringArray( "*.pgn" )
[connection signal="confirmed" from="Network" to="." method="_on_Network_confirmed"]
[connection signal="file_selected" from="FileDialog" to="MenuBar" method="_on_FileDialog_file_selected"]
[connection signal="file_selected" from="FileDialog" to="." method="_on_FileDialog_file_selected"]
1 change: 1 addition & 0 deletions UI/UI.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ script = ExtResource( 6 )
[connection signal="reload_games" from="VBoxContainer/HBoxContainer/ViewportContainer/MainGame" to="VBoxContainer/HBoxContainer/UIPanel" method="reload_games"]
[connection signal="turn_updated" from="VBoxContainer/HBoxContainer/ViewportContainer/MainGame" to="VBoxContainer/HBoxContainer/UIPanel" method="update_turn"]
[connection signal="panic_game" from="VBoxContainer/HBoxContainer/UIPanel" to="." method="new_game"]
[connection signal="read" from="FileParser" to="." method="_on_FileParser_read"]
[connection signal="server_connected" from="Lobby" to="." method="_on_Lobby_server_connected"]
[connection signal="server_disconnected" from="Lobby" to="." method="_on_Lobby_server_disconnected"]
[connection signal="server_started" from="Lobby" to="." method="_on_Lobby_server_started"]
Expand Down

0 comments on commit 5c5653c

Please sign in to comment.