From 9d47a111b05fb491b120e28a5380f934d716ce07 Mon Sep 17 00:00:00 2001 From: hpham474 Date: Sat, 13 Nov 2021 23:19:02 -0600 Subject: [PATCH 1/3] Removed option background --- godot_ship/scenes/Options.tscn | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/godot_ship/scenes/Options.tscn b/godot_ship/scenes/Options.tscn index 8ce2cdd..2b22f13 100644 --- a/godot_ship/scenes/Options.tscn +++ b/godot_ship/scenes/Options.tscn @@ -1,6 +1,5 @@ -[gd_scene load_steps=3 format=2] +[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/options/Options.gd" type="Script" id=2] [node name="Options" type="Control"] @@ -11,15 +10,6 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="Background" type="TextureRect" parent="."] -margin_right = 40.0 -margin_bottom = 40.0 -texture = ExtResource( 1 ) -__meta__ = { -"_edit_lock_": true, -"_edit_use_anchors_": false -} - [node name="MenuLabel" type="RichTextLabel" parent="."] margin_left = 294.0 margin_top = 68.0 From 63dec75688ca8a81becafa8b9805a2bc030e1414 Mon Sep 17 00:00:00 2001 From: tommy-l-ngo Date: Sat, 13 Nov 2021 23:32:19 -0600 Subject: [PATCH 2/3] Added Confirmation Dialog for Forfeit --- godot_ship/scenes/Game/Game.tscn | 20 ++++++++++++++++++-- godot_ship/scenes/Main.tscn | 1 + godot_ship/script/game/Gameplay/Game.gd | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/godot_ship/scenes/Game/Game.tscn b/godot_ship/scenes/Game/Game.tscn index 52cf89f..31dbf81 100644 --- a/godot_ship/scenes/Game/Game.tscn +++ b/godot_ship/scenes/Game/Game.tscn @@ -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"] diff --git a/godot_ship/scenes/Main.tscn b/godot_ship/scenes/Main.tscn index 056eeb3..c36dcb7 100644 --- a/godot_ship/scenes/Main.tscn +++ b/godot_ship/scenes/Main.tscn @@ -13,6 +13,7 @@ __meta__ = { } [node name="Background" type="TextureRect" parent="."] +visible = false margin_right = 40.0 margin_bottom = 40.0 texture = ExtResource( 1 ) diff --git a/godot_ship/script/game/Gameplay/Game.gd b/godot_ship/script/game/Gameplay/Game.gd index 2830d80..12a8814 100644 --- a/godot_ship/script/game/Gameplay/Game.gd +++ b/godot_ship/script/game/Gameplay/Game.gd @@ -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): From adb3fc659ea6672724d733cb80c1ad4dd11a1082 Mon Sep 17 00:00:00 2001 From: tommy-l-ngo Date: Sat, 13 Nov 2021 23:35:11 -0600 Subject: [PATCH 3/3] Revert "Merge branch 'game-logic' of https://github.com/StatewideInk/Group12 into game-logic" This reverts commit 104ffaab0a49438cf29722578d47e7637dce58fb, reversing changes made to 63dec75688ca8a81becafa8b9805a2bc030e1414. --- godot_ship/scenes/Options.tscn | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/godot_ship/scenes/Options.tscn b/godot_ship/scenes/Options.tscn index 2b22f13..8ce2cdd 100644 --- a/godot_ship/scenes/Options.tscn +++ b/godot_ship/scenes/Options.tscn @@ -1,5 +1,6 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=3 format=2] +[ext_resource path="res://assets/backgrounds/Background_Dark.png" type="Texture" id=1] [ext_resource path="res://script/options/Options.gd" type="Script" id=2] [node name="Options" type="Control"] @@ -10,6 +11,15 @@ __meta__ = { "_edit_use_anchors_": false } +[node name="Background" type="TextureRect" parent="."] +margin_right = 40.0 +margin_bottom = 40.0 +texture = ExtResource( 1 ) +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + [node name="MenuLabel" type="RichTextLabel" parent="."] margin_left = 294.0 margin_top = 68.0