From 8f55adb9e17b3f19cd01ac0290e7b595cb4190dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Tue, 13 Oct 2026 15:22:25 -0300 Subject: [PATCH] Remove touchscreen warning Manual revert of 40bb70f2 Helps https://github.com/endlessm/threadbare/issues/806 --- .../title/components/touchscreen_warning.gd | 26 ---------------- .../components/touchscreen_warning.gd.uid | 1 - .../title/components/touchscreen_warning.tscn | 31 +++++++++++++++++-- scenes/menus/title/title_screen.tscn | 7 ----- 4 files changed, 29 insertions(+), 36 deletions(-) delete mode 100644 scenes/menus/title/components/touchscreen_warning.gd delete mode 100644 scenes/menus/title/components/touchscreen_warning.gd.uid diff --git a/scenes/menus/title/components/touchscreen_warning.gd b/scenes/menus/title/components/touchscreen_warning.gd deleted file mode 100644 index 8c0ec12e9e..0000000000 --- a/scenes/menus/title/components/touchscreen_warning.gd +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-FileCopyrightText: The Threadbare Authors -# SPDX-License-Identifier: MPL-2.0 -extends Control - -signal dismissed - - -func _ready() -> void: - if _should_show_touchscreen_warning(): - show() - - -func _should_show_touchscreen_warning() -> bool: - var has_touch: bool = DisplayServer.is_touchscreen_available() - var has_keyboard: bool - if OS.has_feature("web_android") or OS.has_feature("web_ios"): - # DisplayServer.has_hardware_keyboard() is not implemented on the web. - # Assuming mobile web browsers don't have a hardware keyboard. - has_keyboard = false - else: - has_keyboard = DisplayServer.has_hardware_keyboard() - return has_touch and not has_keyboard - - -func _on_dismiss_button_pressed() -> void: - dismissed.emit() diff --git a/scenes/menus/title/components/touchscreen_warning.gd.uid b/scenes/menus/title/components/touchscreen_warning.gd.uid deleted file mode 100644 index 08fb6ebf0e..0000000000 --- a/scenes/menus/title/components/touchscreen_warning.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dx4alphqyxbwv diff --git a/scenes/menus/title/components/touchscreen_warning.tscn b/scenes/menus/title/components/touchscreen_warning.tscn index 954f21f08c..e5adc63a8c 100644 --- a/scenes/menus/title/components/touchscreen_warning.tscn +++ b/scenes/menus/title/components/touchscreen_warning.tscn @@ -1,11 +1,38 @@ [gd_scene format=3 uid="uid://cbf7ft3j4hemp"] -[ext_resource type="Script" uid="uid://dx4alphqyxbwv" path="res://scenes/menus/title/components/touchscreen_warning.gd" id="1_smfbs"] +[sub_resource type="GDScript" id="GDScript_4hx3q"] +script/source = "# SPDX-FileCopyrightText: The Threadbare Authors +# SPDX-License-Identifier: MPL-2.0 +extends Control + +signal dismissed + + +func _ready() -> void: + if _should_show_touchscreen_warning(): + show() + + +func _should_show_touchscreen_warning() -> bool: + var has_touch: bool = DisplayServer.is_touchscreen_available() + var has_keyboard: bool + if OS.has_feature(\"web_android\") or OS.has_feature(\"web_ios\"): + # DisplayServer.has_hardware_keyboard() is not implemented on the web. + # Assuming mobile web browsers don't have a hardware keyboard. + has_keyboard = false + else: + has_keyboard = DisplayServer.has_hardware_keyboard() + return has_touch and not has_keyboard + + +func _on_dismiss_button_pressed() -> void: + dismissed.emit() +" [node name="TouchscreenWarning" type="Control" unique_id=2046863085] layout_mode = 3 anchors_preset = 0 -script = ExtResource("1_smfbs") +script = SubResource("GDScript_4hx3q") metadata/_tab_index = 0 [node name="PanelContainer" type="PanelContainer" parent="." unique_id=479124586] diff --git a/scenes/menus/title/title_screen.tscn b/scenes/menus/title/title_screen.tscn index c61351eab3..2a5c07bb7f 100644 --- a/scenes/menus/title/title_screen.tscn +++ b/scenes/menus/title/title_screen.tscn @@ -6,7 +6,6 @@ [ext_resource type="AudioStream" uid="uid://kc657macgib4" path="res://assets/first_party/music/Threadbare_Main_Loud.ogg" id="5_5uobg"] [ext_resource type="Texture2D" uid="uid://lg5dl13njsg3" path="res://assets/first_party/tiles/Grass_And_Sand_Tiles.png" id="5_c6kyi"] [ext_resource type="PackedScene" uid="uid://6s70kur03rjk" path="res://scenes/menus/title/components/credits.tscn" id="6_2ijyo"] -[ext_resource type="PackedScene" uid="uid://cbf7ft3j4hemp" path="res://scenes/menus/title/components/touchscreen_warning.tscn" id="6_5uobg"] [ext_resource type="PackedScene" uid="uid://dkeb0yjgcfi86" path="res://scenes/menus/options/options.tscn" id="8_5uobg"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2ijyo"] @@ -64,15 +63,9 @@ layout_mode = 2 size_flags_vertical = 3 metadata/_tab_index = 2 -[node name="TouchscreenWarning" parent="Pages" unique_id=2046863085 instance=ExtResource("6_5uobg")] -visible = false -layout_mode = 2 -metadata/_tab_index = 3 - [connection signal="continue_pressed" from="Pages/MainMenu" to="." method="_on_main_menu_continue_pressed"] [connection signal="credits_pressed" from="Pages/MainMenu" to="." method="_on_main_menu_credits_pressed"] [connection signal="options_pressed" from="Pages/MainMenu" to="." method="_on_main_menu_options_pressed"] [connection signal="start_pressed" from="Pages/MainMenu" to="." method="_on_start_pressed"] [connection signal="back" from="Pages/Credits" to="." method="_on_credits_back"] [connection signal="back" from="Pages/Options" to="." method="_on_options_back"] -[connection signal="dismissed" from="Pages/TouchscreenWarning" to="Pages/MainMenu" method="show"]