summaryrefslogtreecommitdiff
path: root/UI
diff options
context:
space:
mode:
Diffstat (limited to 'UI')
-rw-r--r--UI/Assets/background.jpgbin0 -> 722373 bytes
-rw-r--r--UI/Assets/background.jpg.import34
-rw-r--r--UI/hud.gd7
-rw-r--r--UI/hud.tscn21
-rw-r--r--UI/start.gd5
-rw-r--r--UI/start.tscn35
6 files changed, 102 insertions, 0 deletions
diff --git a/UI/Assets/background.jpg b/UI/Assets/background.jpg
new file mode 100644
index 0000000..90789b6
--- /dev/null
+++ b/UI/Assets/background.jpg
Binary files differ
diff --git a/UI/Assets/background.jpg.import b/UI/Assets/background.jpg.import
new file mode 100644
index 0000000..61ab5dc
--- /dev/null
+++ b/UI/Assets/background.jpg.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cyw52lkxbbnbb"
+path="res://.godot/imported/background.jpg-7ab479536167978b65a746ec270a1959.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://UI/Assets/background.jpg"
+dest_files=["res://.godot/imported/background.jpg-7ab479536167978b65a746ec270a1959.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/UI/hud.gd b/UI/hud.gd
new file mode 100644
index 0000000..d5f7cc3
--- /dev/null
+++ b/UI/hud.gd
@@ -0,0 +1,7 @@
+extends CanvasLayer
+
+
+func _ready() -> void:
+ Game.score_changed.connect(func():
+ %Score.text = str(Game.score)
+ )
diff --git a/UI/hud.tscn b/UI/hud.tscn
new file mode 100644
index 0000000..e02d9dd
--- /dev/null
+++ b/UI/hud.tscn
@@ -0,0 +1,21 @@
+[gd_scene load_steps=2 format=3 uid="uid://cuemoig58el4f"]
+
+[ext_resource type="Script" path="res://UI/hud.gd" id="1_ip2w4"]
+
+[node name="HUD" type="CanvasLayer"]
+script = ExtResource("1_ip2w4")
+
+[node name="MarginContainer" type="MarginContainer" parent="."]
+offset_right = 40.0
+offset_bottom = 40.0
+theme_override_constants/margin_left = 8
+theme_override_constants/margin_top = 8
+theme_override_constants/margin_right = 8
+theme_override_constants/margin_bottom = 8
+
+[node name="Score" type="Label" parent="MarginContainer"]
+unique_name_in_owner = true
+layout_mode = 2
+size_flags_horizontal = 0
+size_flags_vertical = 0
+text = "0"
diff --git a/UI/start.gd b/UI/start.gd
new file mode 100644
index 0000000..5290112
--- /dev/null
+++ b/UI/start.gd
@@ -0,0 +1,5 @@
+extends Control
+
+
+func _on_balloons_button_pressed() -> void:
+ get_tree().change_scene_to_file("res://Stage/balloons.tscn")
diff --git a/UI/start.tscn b/UI/start.tscn
new file mode 100644
index 0000000..bd02fd2
--- /dev/null
+++ b/UI/start.tscn
@@ -0,0 +1,35 @@
+[gd_scene load_steps=2 format=3 uid="uid://b20e404dx8nk1"]
+
+[ext_resource type="Script" path="res://UI/start.gd" id="1_6l74h"]
+
+[node name="Start" type="Control"]
+layout_mode = 3
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+script = ExtResource("1_6l74h")
+
+[node name="CenterContainer" type="CenterContainer" parent="."]
+layout_mode = 1
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+
+[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
+layout_mode = 2
+
+[node name="BalloonsButton" type="Button" parent="CenterContainer/VBoxContainer"]
+unique_name_in_owner = true
+layout_mode = 2
+text = "Balloons"
+
+[node name="ForestButton" type="Button" parent="CenterContainer/VBoxContainer"]
+unique_name_in_owner = true
+layout_mode = 2
+text = "Forest"
+
+[connection signal="pressed" from="CenterContainer/VBoxContainer/BalloonsButton" to="." method="_on_balloons_button_pressed"]