On branch feat/godot-configurator

Changes to be committed:
	modified:   tools/configurator/components/bios_check/bios_check.gd
	modified:   tools/configurator/main.gd
	modified:   tools/configurator/main.tscn
	modified:   tools/configurator/res/pixel_ui_theme/RetroDECKTheme.tres
This commit is contained in:
monkeyx-net 2024-07-29 17:17:25 +01:00
parent 73df849e4f
commit 82908b01e6
4 changed files with 71 additions and 50 deletions

View file

@ -14,8 +14,10 @@ func _ready():
$".".theme = custom_theme
#Check if XDG_RUNTIME_DIR is set and choose temp file location
if OS.has_environment("XDG_RUNTIME_DIR"):
#bios_tempfile = OS.get_environment("XDG_RUNTIME_DIR") + "/godot_temp/godot_bios_files_checked.tmp"
bios_tempfile = "/var/config/retrodeck/godot/godot_bios_files_checked.tmp"
#temporary hack for Tim
# This uses tempfs system revisit
bios_tempfile = OS.get_environment("XDG_RUNTIME_DIR") + "/godot_temp/godot_bios_files_checked.tmp"
# bios_tempfile = "/var/config/retrodeck/godot/godot_bios_files_checked.tmp"
else:
bios_tempfile = "/var/config/retrodeck/godot/godot_bios_files_checked.tmp"

View file

@ -22,6 +22,15 @@ func _ready():
_get_nodes()
_connect_signals()
_play_main_animations()
var file_path = "../../tools/configurator.sh"
var command = "sed -n '/local emulator_list=(/,/)/{s/.*local emulator_list=\\(.*\\)/\\1/; /)/q; p}' "
var emulator_list = class_functions.get_text_file_from_system_path(file_path,command)
file_path = "/var/config/retrodeck/retrodeck.cfg"
command = "sed -n '/\\[abxy_button_swap\\]/,/^\\s*$/p' "
var abxy_button_list = class_functions.get_text_file_from_system_path(file_path,command)
print(abxy_button_list)
print (emulator_list)
# set current startup tab to match IDE
tab_container.current_tab = 3
add_child(class_functions) # Needed for threaded results
@ -47,9 +56,17 @@ func _connect_signals() -> void:
theme_option.item_selected.connect(_conf_theme)
signal_theme_changed.emit(theme_option.item_selected)
emu_select_option.item_selected.connect(_emu_select)
emu_pick_option.item_selected.connect(_emu_select) # place holder
emu_pick_option.item_selected.connect(_emu_pick)
func _emu_select(index: int) -> void:
emu_pick_option.visible = true
#change to radio button select
_play_main_animations()
if (index == 3): # make function and pass start and end
emu_pick_option.set_item_disabled(1, true)
emu_pick_option.set_item_disabled(2, true)
func _emu_pick(index: int) -> void:
emu_pick_option.visible = true
_play_main_animations()

View file

@ -444,7 +444,7 @@ layout_mode = 2
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
item_count = 3
item_count = 4
selected = 0
popup/item_0/text = "TK_SELECT_EMU"
popup/item_0/id = 0
@ -454,6 +454,8 @@ popup/item_1/text = "RetroArch"
popup/item_1/id = 1
popup/item_2/text = "MAME"
popup/item_2/id = 2
popup/item_3/text = ""
popup/item_3/id = 3
[node name="emu_pick_option" type="OptionButton" parent="Background/MarginContainer/TabContainer/TK_TOOLS/ScrollContainer/VBoxContainer/tools_container"]
unique_name_in_owner = true

File diff suppressed because one or more lines are too long