mirror of
https://github.com/JohnBreaux/Boat-Battle.git
synced 2024-11-15 05:25:57 +00:00
Added Confirmation Dialog for Forfeit
This commit is contained in:
parent
bf58a2b29e
commit
63dec75688
@ -1,9 +1,7 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://assets/backgrounds/Background_Dark.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/game/Gameplay/Game.gd" type="Script" id=3]
|
||||
|
||||
|
||||
[node name="Game" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@ -31,4 +29,22 @@ margin_right = 53.0
|
||||
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
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -111.5
|
||||
margin_top = -29.0
|
||||
margin_right = 111.5
|
||||
margin_bottom = 29.0
|
||||
rect_min_size = Vector2( 150, 52.5 )
|
||||
window_title = "Forfeit Confirmation..."
|
||||
dialog_text = "Are you sure you want to forfeit?"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false,
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="Buttons/Forfeit" to="." method="_on_Forfeit_pressed"]
|
||||
|
@ -13,6 +13,7 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="Background" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
texture = ExtResource( 1 )
|
||||
|
@ -31,6 +31,9 @@ func _ready():
|
||||
var setup = Setup.instance()
|
||||
setup.connect("game_ready", self, "game_setup")
|
||||
add_child(setup)
|
||||
|
||||
get_node("ConfirmationDialog").get_ok().text = "Yes"
|
||||
get_node("ConfirmationDialog").get_cancel().text = "No"
|
||||
|
||||
# TODO: Move Setup into the Player.
|
||||
func game_setup(_ships):
|
||||
|
Loading…
Reference in New Issue
Block a user