From 52081f876f52eb456f98d12538454741c2524d9e Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Thu, 21 Dec 2023 17:43:45 +0900 Subject: [PATCH] Touch interface and screen size fixes --- export_presets.cfg | 2 +- player.tscn | 40 +++++++++++++++++++++------------------- project.godot | 5 +++++ 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/export_presets.cfg b/export_presets.cfg index 0c37f96..a2fd0f2 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -8,7 +8,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="html_export/ld54.html" +export_path="./ld54_html_export/ld54.html" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false diff --git a/player.tscn b/player.tscn index f757bc6..b9b2080 100644 --- a/player.tscn +++ b/player.tscn @@ -14,6 +14,8 @@ colors = PackedColorArray(1, 1, 1, 0.454902, 1, 1, 1, 0) [sub_resource type="GradientTexture2D" id="GradientTexture2D_iin72"] gradient = SubResource("Gradient_v7mm3") +width = 128 +height = 128 fill = 1 fill_from = Vector2(0.5, 0.5) fill_to = Vector2(1, 0.5) @@ -32,39 +34,39 @@ scale = Vector2(40, 40) texture = SubResource("CanvasTexture_ruce8") [node name="JumpTouchButton" type="TouchScreenButton" parent="."] -position = Vector2(-32.9999, -95) +position = Vector2(-64, -159) texture_normal = SubResource("GradientTexture2D_iin72") action = "jump" [node name="Label" type="Label" parent="JumpTouchButton"] -offset_left = 12.0 -offset_top = 19.0 -offset_right = 53.0 -offset_bottom = 42.0 +offset_left = 42.0 +offset_top = 52.0 +offset_right = 83.0 +offset_bottom = 75.0 text = "Jump" [node name="RightTouchButton" type="TouchScreenButton" parent="."] -position = Vector2(40, -30) +position = Vector2(53, -60) texture_normal = SubResource("GradientTexture2D_iin72") action = "right" [node name="Label" type="Label" parent="RightTouchButton"] -offset_left = 12.0 -offset_top = 19.0 -offset_right = 53.0 -offset_bottom = 42.0 +offset_left = 43.0 +offset_top = 53.0 +offset_right = 84.0 +offset_bottom = 76.0 text = "Right" [node name="LeftTouchButton" type="TouchScreenButton" parent="."] -position = Vector2(-103, -30) +position = Vector2(-184, -60) texture_normal = SubResource("GradientTexture2D_iin72") action = "left" [node name="Label" type="Label" parent="LeftTouchButton"] -offset_left = 18.0 -offset_top = 20.0 -offset_right = 59.0 -offset_bottom = 43.0 +offset_left = 47.0 +offset_top = 53.0 +offset_right = 88.0 +offset_bottom = 76.0 text = "Left" [node name="Camera2D" type="Camera2D" parent="."] @@ -88,8 +90,8 @@ stream = ExtResource("2_ix2ut") stream = ExtResource("3_gq63f") [node name="GameTitleText" type="RichTextLabel" parent="."] -offset_left = -138.0 -offset_top = 46.0 -offset_right = 335.0 -offset_bottom = 286.0 +offset_left = -229.0 +offset_top = 18.0 +offset_right = 244.0 +offset_bottom = 258.0 scroll_active = false diff --git a/project.godot b/project.godot index 91241cf..e1f8ae8 100644 --- a/project.godot +++ b/project.godot @@ -15,6 +15,11 @@ run/main_scene="res://boxedSpace.tscn" config/features=PackedStringArray("4.2", "GL Compatibility") config/icon="res://icon.svg" +[display] + +window/size/viewport_width=500 +window/size/viewport_height=500 + [input] jump={ -- 2.49.0