2022-08-09 07:17:54 +00:00
|
|
|
extends CanvasLayer
|
2022-08-03 01:01:10 +00:00
|
|
|
|
2022-08-08 06:42:26 +00:00
|
|
|
|
2022-08-16 07:37:53 +00:00
|
|
|
onready var node_variables = get_node("/root/NodeVariables")
|
|
|
|
onready var ui_control = get_node("/root/UiControl")
|
2022-08-16 09:42:32 +00:00
|
|
|
onready var user_values = get_node("/root/UserValues")
|
|
|
|
|
2022-08-08 06:42:26 +00:00
|
|
|
|
2022-08-03 01:01:10 +00:00
|
|
|
func _ready():
|
2022-08-08 06:42:26 +00:00
|
|
|
# Read config file if it exists
|
|
|
|
# otherwise set up new user data
|
|
|
|
|
2022-08-16 09:42:32 +00:00
|
|
|
if user_values.err != OK:
|
2022-08-09 07:17:54 +00:00
|
|
|
ui_control.show_user_menu()
|
2022-08-16 09:30:28 +00:00
|
|
|
node_variables.first_time_label.visible = true
|
2022-08-08 06:42:26 +00:00
|
|
|
|
|
|
|
else:
|
|
|
|
|
2022-08-03 01:01:10 +00:00
|
|
|
# Set starting state visibility
|
2022-08-09 07:17:54 +00:00
|
|
|
ui_control.show_start_menu()
|
2022-08-17 04:23:41 +00:00
|
|
|
node_variables.first_time_label.visible = false
|
2022-08-08 06:42:26 +00:00
|
|
|
|
|
|
|
# define variables from ini file
|
2022-08-16 09:42:32 +00:00
|
|
|
node_variables.user_name.text = user_values.user_first_name
|
2022-08-08 06:42:26 +00:00
|
|
|
|
|
|
|
# Iterate over all sections.
|
|
|
|
# for player in config.get_sections():
|
|
|
|
# # Fetch the data for each section.
|
|
|
|
# var player_name = config.get_value(player, "player_name")
|
|
|
|
# var player_score = config.get_value(player, "best_score")
|
2022-08-03 01:01:10 +00:00
|
|
|
|
|
|
|
#func _process(delta):
|
|
|
|
# pass
|