summaryrefslogtreecommitdiff
path: root/UI
diff options
context:
space:
mode:
Diffstat (limited to 'UI')
-rw-r--r--UI/HUD/CancelButton.gd5
-rw-r--r--UI/HUD/CancelButton.tscn28
2 files changed, 33 insertions, 0 deletions
diff --git a/UI/HUD/CancelButton.gd b/UI/HUD/CancelButton.gd
new file mode 100644
index 0000000..51b146b
--- /dev/null
+++ b/UI/HUD/CancelButton.gd
@@ -0,0 +1,5 @@
+extends Button
+
+
+func _on_CancelButton_pressed():
+ Global.cancel_level()
diff --git a/UI/HUD/CancelButton.tscn b/UI/HUD/CancelButton.tscn
new file mode 100644
index 0000000..27441cb
--- /dev/null
+++ b/UI/HUD/CancelButton.tscn
@@ -0,0 +1,28 @@
+[gd_scene load_steps=4 format=2]
+
+[ext_resource path="res://UI/HUD/CancelButton.gd" type="Script" id=1]
+
+[sub_resource type="StyleBoxFlat" id=2]
+bg_color = Color( 0, 0, 0, 1 )
+
+[sub_resource type="StyleBoxFlat" id=1]
+bg_color = Color( 0.6, 0.6, 0.6, 0 )
+border_width_left = 1
+border_width_top = 1
+border_width_right = 1
+border_width_bottom = 1
+border_color = Color( 0, 0, 0, 1 )
+
+[node name="CancelButton" type="Button"]
+anchor_right = 1.0
+anchor_bottom = 1.0
+margin_top = 576.0
+margin_right = -960.0
+custom_styles/hover = SubResource( 2 )
+custom_styles/normal = SubResource( 1 )
+text = "Cancel"
+script = ExtResource( 1 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
+[connection signal="pressed" from="." to="." method="_on_CancelButton_pressed"]