mirror of
				https://github.com/JohnBreaux/Boat-Battle.git
				synced 2025-02-04 12:28:35 +00:00 
			
		
		
		
	Added Confirmation dialog for Forfeit
This commit is contained in:
		@@ -30,7 +30,6 @@ margin_bottom = 20.0
 | 
			
		||||
text = "Forfeit"
 | 
			
		||||
 | 
			
		||||
[node name="ConfirmationDialog" type="ConfirmationDialog" parent="."]
 | 
			
		||||
visible = true
 | 
			
		||||
anchor_left = 0.5
 | 
			
		||||
anchor_top = 0.5
 | 
			
		||||
anchor_right = 0.5
 | 
			
		||||
@@ -48,3 +47,4 @@ __meta__ = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[connection signal="pressed" from="Buttons/Forfeit" to="." method="_on_Forfeit_pressed"]
 | 
			
		||||
[connection signal="confirmed" from="ConfirmationDialog" to="." method="_on_ConfirmationDialog_confirmed"]
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,10 @@ func display_turn():
 | 
			
		||||
 | 
			
		||||
func _on_Forfeit_pressed():
 | 
			
		||||
	AudioBus.emit_signal("button_clicked")
 | 
			
		||||
	end()
 | 
			
		||||
	get_node("ConfirmationDialog").popup()
 | 
			
		||||
 | 
			
		||||
func end():
 | 
			
		||||
	queue_free()
 | 
			
		||||
 | 
			
		||||
func _on_ConfirmationDialog_confirmed():
 | 
			
		||||
	end()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user