From eafc64b63148e144fc577a32a699805de8b23f52 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Wed, 29 May 2024 16:32:19 +0930 Subject: [PATCH] Uncommitted fixup from google play build --- scenes/MainMenu.tscn | 14 ++++++++------ scripts/MainMenu.gd | 3 +++ singletons/FileLoader.gd | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/scenes/MainMenu.tscn b/scenes/MainMenu.tscn index 1ae2922..4539267 100644 --- a/scenes/MainMenu.tscn +++ b/scenes/MainMenu.tscn @@ -8,18 +8,12 @@ anchor_right = 1.0 anchor_bottom = 1.0 theme = ExtResource( 1 ) script = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} [node name="VBoxContainer" type="VBoxContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 custom_constants/separation = 16 alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} [node name="btn_touch" type="Button" parent="VBoxContainer"] margin_left = 451.0 @@ -35,6 +29,7 @@ margin_top = 464.0 margin_right = 614.0 margin_bottom = 532.0 size_flags_horizontal = 4 +disabled = true text = "Step" [node name="btn_settings" type="Button" parent="VBoxContainer"] @@ -43,6 +38,7 @@ margin_top = 548.0 margin_right = 653.0 margin_bottom = 616.0 size_flags_horizontal = 4 +disabled = true text = "Settings" [node name="btn_quit" type="Button" parent="VBoxContainer"] @@ -53,6 +49,12 @@ margin_bottom = 700.0 size_flags_horizontal = 4 text = "Quit" +[node name="lbl_settingspath" type="Label" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +text = "Library directory is" +align = 1 + [connection signal="pressed" from="VBoxContainer/btn_touch" to="." method="_on_btn_touch_pressed"] [connection signal="pressed" from="VBoxContainer/btn_step" to="." method="_on_btn_step_pressed"] [connection signal="pressed" from="VBoxContainer/btn_quit" to="." method="quit"] diff --git a/scripts/MainMenu.gd b/scripts/MainMenu.gd index 2b25d67..8b51aa6 100644 --- a/scripts/MainMenu.gd +++ b/scripts/MainMenu.gd @@ -2,6 +2,9 @@ extends Control signal start_touchgame signal start_stepgame +func _ready() -> void: + $lbl_settingspath.text = "Data directory is\n" + FileLoader.userroot + func quit() -> void: get_tree().quit() diff --git a/singletons/FileLoader.gd b/singletons/FileLoader.gd index 8642d3d..f8bf78c 100644 --- a/singletons/FileLoader.gd +++ b/singletons/FileLoader.gd @@ -11,7 +11,7 @@ const NOT_FOUND := '' const default_difficulty_keys = ['Z', 'B', 'A', 'E', 'M', 'R'] var userroot := OS.get_user_data_dir().rstrip('/')+'/' if OS.get_name() != 'Android' else '/storage/emulated/0/RhythmGame/' -var PATHS := PoolStringArray([userroot, '/home/luke/RTG/']) # Temporary hardcoded testing +var PATHS := PoolStringArray([userroot]) # Temporary hardcoded testing # The following would probably work. One huge caveat is that permission needs to be manually granted by the user in app settings as we can't use OS.request_permission('WRITE_EXTERNAL_STORAGE') # '/storage/emulated/0/Android/data/au.ufeff.rhythmgame/' # '/sdcard/Android/data/au.ufeff.rhythmgame/'