From 5afd1a00a58d53c56ecc003ff0705c0a8773b19f Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 14 Nov 2025 10:16:53 +0200 Subject: Add touchscreen button icons --- touch_screen_button.gd | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 touch_screen_button.gd (limited to 'touch_screen_button.gd') 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 -- cgit v1.3