summaryrefslogtreecommitdiff
path: root/ui/mobile/button.tscn
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-12-28 15:08:23 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-12-28 15:08:23 +0100
commit474ef692613f298ab05bbb65ad85625f178b63cc (patch)
treed069e587c8d731ea8191ee0318abc85694c04351 /ui/mobile/button.tscn
parentd572bc0a27b05c6632ba76bd630c7c4fd8f0ae5d (diff)
next commit
Diffstat (limited to 'ui/mobile/button.tscn')
-rw-r--r--ui/mobile/button.tscn43
1 files changed, 43 insertions, 0 deletions
diff --git a/ui/mobile/button.tscn b/ui/mobile/button.tscn
new file mode 100644
index 0000000..64a413f
--- /dev/null
+++ b/ui/mobile/button.tscn
@@ -0,0 +1,43 @@
+[gd_scene load_steps=5 format=3 uid="uid://evppekv62x0g"]
+
+[ext_resource type="Script" path="res://ui/mobile/button.gd" id="1_2pd68"]
+[ext_resource type="Theme" uid="uid://b067xhqktnmhr" path="res://ui/theme.tres" id="2_rnfal"]
+
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qy0ya"]
+bg_color = Color(0.0297164, 0.155372, 0.181691, 1)
+border_width_left = 1
+border_width_top = 1
+border_width_right = 1
+border_width_bottom = 1
+border_color = Color(0, 0, 0, 1)
+border_blend = true
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_cuu3o"]
+resource_local_to_scene = true
+size = Vector2(160, 20)
+
+[node name="Button" type="Panel"]
+texture_filter = 1
+offset_right = 160.0
+offset_bottom = 20.0
+theme_override_styles/panel = SubResource("StyleBoxFlat_qy0ya")
+script = ExtResource("1_2pd68")
+
+[node name="TouchScreenButton" type="TouchScreenButton" parent="."]
+position = Vector2(80, 10)
+shape = SubResource("RectangleShape2D_cuu3o")
+shape_visible = false
+visibility_mode = 1
+
+[node name="Label" type="Label" parent="."]
+layout_mode = 0
+offset_right = 160.0
+offset_bottom = 20.0
+theme = ExtResource("2_rnfal")
+theme_override_colors/font_color = Color(1, 1, 1, 1)
+horizontal_alignment = 1
+vertical_alignment = 1
+
+[connection signal="resized" from="." to="." method="_on_resized"]
+[connection signal="pressed" from="TouchScreenButton" to="." method="_on_touch_screen_button_pressed"]
+[connection signal="released" from="TouchScreenButton" to="." method="_on_touch_screen_button_released"]