summaryrefslogtreecommitdiffstats
path: root/touch_screen_button.gd
diff options
context:
space:
mode:
Diffstat (limited to 'touch_screen_button.gd')
-rw-r--r--touch_screen_button.gd14
1 files changed, 14 insertions, 0 deletions
diff --git a/touch_screen_button.gd b/touch_screen_button.gd
new file mode 100644
index 0000000..a03376d
--- /dev/null
+++ b/touch_screen_button.gd
@@ -0,0 +1,14 @@
+extends TouchScreenButton
+
+@export var texture: Texture2D
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+ $TextureRect.texture = texture
+ if not DisplayServer.is_touchscreen_available():
+ visible = false
+
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+func _process(_delta: float) -> void:
+ pass