From a47cb991f20d133323f49b242128a9a93e1f3342 Mon Sep 17 00:00:00 2001 From: tommy-l-ngo Date: Fri, 12 Nov 2021 03:44:52 -0600 Subject: [PATCH] Fixed Dialog Box that pops up for Confirm Placement --- godot_ship/scenes/Gameplay.tscn | 1 + godot_ship/script/game/Gameplay.gd | 2 ++ 2 files changed, 3 insertions(+) diff --git a/godot_ship/scenes/Gameplay.tscn b/godot_ship/scenes/Gameplay.tscn index 3518ee1..7489604 100644 --- a/godot_ship/scenes/Gameplay.tscn +++ b/godot_ship/scenes/Gameplay.tscn @@ -118,6 +118,7 @@ __meta__ = { } [node name="AcceptDialog" type="AcceptDialog" parent="."] +visible = true anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 diff --git a/godot_ship/script/game/Gameplay.gd b/godot_ship/script/game/Gameplay.gd index 0f19861..2f8f64b 100644 --- a/godot_ship/script/game/Gameplay.gd +++ b/godot_ship/script/game/Gameplay.gd @@ -23,6 +23,8 @@ func _on_Confirm_Placement_pressed(): if get_node(ship).validate_placement(): valid = false print ("Placement: ", valid) + if valid == false: + get_node("AcceptDialog").popup() return valid # Replace with function body.