2024-07-31 13:57:37 +00:00
|
|
|
extends MarginContainer
|
|
|
|
|
2024-08-01 10:47:55 +00:00
|
|
|
#var class_functions: ClassFunctions
|
2024-07-31 13:57:37 +00:00
|
|
|
|
|
|
|
var website_button: Button
|
|
|
|
var changelog_button: Button
|
|
|
|
var wiki_button: Button
|
|
|
|
var credits_button: Button
|
|
|
|
var donate_button: Button
|
|
|
|
var contactus_button: Button
|
|
|
|
var licenses_button: Button
|
2024-08-02 19:08:14 +00:00
|
|
|
var app_data = AppData.new()
|
2024-07-31 13:57:37 +00:00
|
|
|
|
|
|
|
func _ready():
|
2024-08-02 19:08:14 +00:00
|
|
|
#tk_about = class_functions.import_csv_data("res://tk_about.txt")
|
2024-08-04 18:45:51 +00:00
|
|
|
app_data = data_handler.load_base_data()
|
2024-07-31 13:57:37 +00:00
|
|
|
_get_nodes()
|
|
|
|
_connect_signals()
|
|
|
|
|
2024-08-02 19:08:14 +00:00
|
|
|
for id in app_data.about_links:
|
|
|
|
var web_data = app_data.about_links[id]
|
|
|
|
match id:
|
2024-07-31 13:57:37 +00:00
|
|
|
"rd_web":
|
2024-08-02 19:08:14 +00:00
|
|
|
%website_button.tooltip_text = web_data.description
|
|
|
|
%website_button.editor_description = web_data.url
|
2024-07-31 13:57:37 +00:00
|
|
|
"rd_changelog":
|
2024-08-02 19:08:14 +00:00
|
|
|
%changelog_button.tooltip_text = web_data.description
|
|
|
|
%changelog_button.editor_description = web_data.url
|
2024-07-31 13:57:37 +00:00
|
|
|
"rd_wiki":
|
2024-08-02 19:08:14 +00:00
|
|
|
%wiki_button.tooltip_text = web_data.description
|
|
|
|
%wiki_button.editor_description = web_data.url
|
2024-07-31 13:57:37 +00:00
|
|
|
"rd_credits":
|
2024-08-02 19:08:14 +00:00
|
|
|
%credits_button.tooltip_text = web_data.description
|
|
|
|
%credits_button.editor_description = web_data.url
|
2024-07-31 13:57:37 +00:00
|
|
|
"rd_donate":
|
2024-08-02 19:08:14 +00:00
|
|
|
%donate_button.tooltip_text = web_data.description
|
|
|
|
%donate_button.editor_description = web_data.url
|
2024-07-31 13:57:37 +00:00
|
|
|
"rd_contactus":
|
2024-08-02 19:08:14 +00:00
|
|
|
%contactus_button.tooltip_text = web_data.description
|
|
|
|
%contactus_button.editor_description = web_data.url
|
2024-07-31 13:57:37 +00:00
|
|
|
"rd_licenses":
|
2024-08-02 19:08:14 +00:00
|
|
|
%licenses_button.tooltip_text = web_data.description
|
|
|
|
%licenses_button.editor_description = web_data.url
|
2024-07-31 13:57:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
func _get_nodes() -> void:
|
|
|
|
website_button = get_node("%website_button")
|
|
|
|
changelog_button = get_node("%changelog_button")
|
|
|
|
wiki_button = get_node("%wiki_button")
|
|
|
|
credits_button = get_node("%credits_button")
|
|
|
|
donate_button = get_node("%donate_button")
|
|
|
|
contactus_button = get_node("%contactus_button")
|
|
|
|
licenses_button = get_node("%licenses_button")
|
|
|
|
|
|
|
|
|
|
|
|
func _connect_signals() -> void:
|
|
|
|
website_button.pressed.connect(_about_button_pressed.bind("rd_web"))
|
|
|
|
changelog_button.pressed.connect(_about_button_pressed.bind("rd_changelog"))
|
|
|
|
wiki_button.pressed.connect(_about_button_pressed.bind("rd_wiki"))
|
|
|
|
credits_button.pressed.connect(_about_button_pressed.bind("rd_credits"))
|
|
|
|
donate_button.pressed.connect(_about_button_pressed.bind("rd_donate"))
|
|
|
|
contactus_button.pressed.connect(_about_button_pressed.bind("rd_contactus"))
|
|
|
|
licenses_button.pressed.connect(_about_button_pressed.bind("rd_licenses"))
|
|
|
|
|
|
|
|
func _about_button_pressed(id: String) -> void:
|
|
|
|
match id:
|
|
|
|
"rd_web":
|
|
|
|
OS.shell_open(%website_button.editor_description)
|
|
|
|
"rd_changelog":
|
|
|
|
OS.shell_open(%changelog_button.editor_description)
|
|
|
|
"rd_wiki":
|
|
|
|
OS.shell_open(%wiki_button.editor_description)
|
|
|
|
"rd_credits":
|
|
|
|
OS.shell_open(%credits_button.editor_description)
|
|
|
|
"rd_donate":
|
|
|
|
OS.shell_open(%donate_button.editor_description)
|
|
|
|
"rd_contactus":
|
|
|
|
OS.shell_open(%contactus_button.editor_description)
|
|
|
|
"rd_licenses":
|
|
|
|
OS.shell_open(%licenses_button.editor_description)
|
2024-07-31 19:45:58 +00:00
|
|
|
_:
|
|
|
|
print ("ID not found")
|