mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 23:45:39 +00:00
Finally tidy before merge to Cooker
On branch godot-data-demo Changes to be committed: modified: tools/configurator/main.gd modified: tools/configurator/main.tscn modified: tools/configurator/res/pixel_ui_theme/RetroDECKTheme.tres modified: tools/configurator/scripts/data_handler.gd modified: tools/configurator/scripts/link.gd modified: tools/configurator/tk_about.gd
This commit is contained in:
parent
95a4b2de95
commit
e26a5956f2
|
@ -26,17 +26,20 @@ func _ready():
|
|||
_connect_signals()
|
||||
_play_main_animations()
|
||||
$Background/locale_option.selected = class_functions.map_locale_id(OS.get_locale_language())
|
||||
|
||||
"""
|
||||
# load json data
|
||||
#app_data = data_handler.load_data()
|
||||
#test to show some data
|
||||
# Load json data. Test to show some data
|
||||
app_data = data_handler.load_base_data()
|
||||
|
||||
if app_data:
|
||||
var website_data = app_data.about_links["rd_web"]
|
||||
print (website_data.name,"-",website_data.url,"-",website_data.description)
|
||||
"""
|
||||
print (app_data.about_links["rd_web"]["url"])
|
||||
|
||||
var console: bool = false
|
||||
var test = class_functions.execute_command("cat",["/var/config/retrodeck/retrodeck.cfg"],console)
|
||||
#print (test)
|
||||
print (test)
|
||||
"""
|
||||
var config_file_path = "/var/config/retrodeck/retrodeck.cfg"
|
||||
var json_file_path = "/var/config/retrodeck/retrodeck.json"
|
||||
var config = data_handler.parse_config_to_json(config_file_path)
|
||||
|
@ -181,7 +184,8 @@ func _on_locale_selected(index):
|
|||
combine_tkeys()
|
||||
|
||||
func combine_tkeys(): #More as a test
|
||||
$Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer/HBoxContainer/GridContainer/cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON")
|
||||
%cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON")
|
||||
#$Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer/HBoxContainer/GridContainer/cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON")
|
||||
#$Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer/game_control_container/GridContainer/cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON")
|
||||
$Background/MarginContainer/TabContainer/TK_GRAPHICS/ScrollContainer/VBoxContainer/decorations_container/GridContainer/shaders.text = tr("TK_SHADERS") + " " + tr("TK_SOON")
|
||||
$Background/MarginContainer/TabContainer/TK_GRAPHICS/ScrollContainer/VBoxContainer/extra_container/GridContainer/tate_mode.text = tr("TK_TATE") + " " + tr("TK_SOON")
|
||||
|
|
|
@ -459,14 +459,6 @@ vertical_icon_alignment = 0
|
|||
[node name="HSeparator" type="HSeparator" parent="Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="game_control_label2" type="Label" parent="Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_icgo5")
|
||||
text = "All Game Settings"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
|
@ -516,6 +508,7 @@ disabled = true
|
|||
text = "TK_ADVANCED"
|
||||
|
||||
[node name="cheats" type="CheckButton" parent="Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer/HBoxContainer/GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
disabled = true
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -19,7 +19,6 @@ func load_base_data() -> AppData:
|
|||
#if parsed_data.error == OK:
|
||||
if parsed_data:
|
||||
var data_dict = parsed_data
|
||||
|
||||
var about_links = {}
|
||||
for key in data_dict["about_links"].keys():
|
||||
var link_data = data_dict["about_links"][key]
|
||||
|
@ -33,7 +32,6 @@ func load_base_data() -> AppData:
|
|||
for key in data_dict["emulator"].keys():
|
||||
var emulator_data = data_dict["emulator"][key]
|
||||
var emulator = Emulator.new()
|
||||
|
||||
emulator.name = emulator_data["name"]
|
||||
emulator.description = emulator_data["description"]
|
||||
print (emulator.name)
|
||||
|
@ -41,15 +39,16 @@ func load_base_data() -> AppData:
|
|||
for property_data in emulator_data["properties"]:
|
||||
var property = EmulatorProperty.new()
|
||||
property.standalone = property_data.get("standalone", false)
|
||||
#todo fix error
|
||||
# property.abxy_button_status = property_data.get("abxy_button", {}).get("status", false)
|
||||
emulator.properties.append(property)
|
||||
|
||||
emulators[key] = emulator
|
||||
|
||||
var app_data = AppData.new()
|
||||
app_data.about_links = about_links
|
||||
app_data.emulators = emulators
|
||||
return app_data
|
||||
var this_app_data = AppData.new()
|
||||
this_app_data.about_links = about_links
|
||||
this_app_data.emulators = emulators
|
||||
return this_app_data
|
||||
else:
|
||||
print("Error parsing JSON")
|
||||
else:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
extends Resource
|
||||
|
||||
class_name Link
|
||||
@export var name: String
|
||||
@export var url: String
|
||||
|
|
|
@ -9,8 +9,6 @@ var credits_button: Button
|
|||
var donate_button: Button
|
||||
var contactus_button: Button
|
||||
var licenses_button: Button
|
||||
#var tk_about: Dictionary
|
||||
#signal signal_theme_changed
|
||||
var app_data = AppData.new()
|
||||
|
||||
func _ready():
|
||||
|
@ -21,9 +19,6 @@ func _ready():
|
|||
|
||||
for id in app_data.about_links:
|
||||
var web_data = app_data.about_links[id]
|
||||
var linkT =Link.new()
|
||||
linkT = app_data.about_links[id]
|
||||
print ("FREEED" + linkT.name)
|
||||
match id:
|
||||
"rd_web":
|
||||
%website_button.tooltip_text = web_data.description
|
||||
|
|
Loading…
Reference in a new issue