minor cleanups - removed outdated comments and empty functions

This commit is contained in:
Jaap Marsman 2022-08-16 17:42:32 +08:00
parent e617d25199
commit 9d71295ff3
10 changed files with 14 additions and 70 deletions

View File

@ -1,21 +1,9 @@
extends Button
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_button_email_feedback_pressed():
# warning-ignore:return_value_discarded
var _error = OS.shell_open("mailto:feedback@jaapmarsman.com")

View File

@ -1,24 +1,8 @@
extends Button
# I'll use this script to call up the user details menu.
# This includes their name, but also topics of interest, etc.
# referencing nodes for menu switching
onready var node_variables = get_node("/root/NodeVariables")
onready var ui_control = get_node("/root/UiControl")
# Called when the node enters the scene tree for the first time.
func _ready():
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
# makes the start menu disappear and the user menu appear
func _on_button_name_pressed():
ui_control.show_user_menu()

View File

@ -1,18 +1,5 @@
extends Button
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
#func _ready():
# pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_button_open_github_pressed():
var _error = OS.shell_open("https://github.com/hobbesjaap/wellbeingapp")

View File

@ -1,10 +1,12 @@
extends Button
onready var node_variables = get_node("/root/NodeVariables")
onready var ui_control = get_node("/root/UiControl")
onready var user_values = get_node("/root/UserValues")
onready var user_name = get_node("%textbox_user_name")
func _on_button_user_save_pressed():
if user_name.text == "":

View File

@ -3,13 +3,14 @@ extends CanvasLayer
onready var node_variables = get_node("/root/NodeVariables")
onready var ui_control = get_node("/root/UiControl")
onready var user_info = get_node("/root/UserValues")
onready var user_values = get_node("/root/UserValues")
func _ready():
# Read config file if it exists
# otherwise set up new user data
if user_info.err != OK:
if user_values.err != OK:
ui_control.show_user_menu()
node_variables.first_time_label.visible = true
@ -19,7 +20,7 @@ func _ready():
ui_control.show_start_menu()
# define variables from ini file
node_variables.user_name.text = user_info.user_first_name
node_variables.user_name.text = user_values.user_first_name
# Iterate over all sections.
# for player in config.get_sections():

View File

@ -12,11 +12,5 @@ onready var first_time_label = get_node("/root/main_screen/UI/top_container/menu
onready var welcome_label = get_node("/root/main_screen/UI/top_container/menus_container/start_menu/welcome_title")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
pass

View File

@ -13,12 +13,6 @@ var release_version = 1
var web_release_version = 0
var current_version = "0.0.8"
func check_update():
pass
func _ready():
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@ -11,13 +11,13 @@ func _ready():
#func _process(_delta):
# Currently the only working way to show the user name. NOT desirable, continuously running the same line of code for no reason than me not figuring it out.
# $welcome_title.text = "Good morning, " + user_info.user_first_name + "!"
# pass
func _on_button_update_check_pressed():
$HTTPRequest.request("https://raw.githubusercontent.com/hobbesjaap/wellbeingapp/main/version_info.csv")
func update_user_name_label():
$welcome_title.text = "Good morning, " + user_values.user_first_name + "!"

View File

@ -4,9 +4,10 @@ extends Node
onready var node_variables = get_node("/root/NodeVariables")
onready var user_values = get_node("/root/UserValues")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
pass
func show_start_menu():
node_variables.main_screen.visible = true
@ -14,18 +15,16 @@ func show_start_menu():
node_variables.user_menu.visible = false
node_variables.daily_prompts.visible = false
func show_user_menu():
node_variables.main_screen.visible = true
node_variables.start_menu.visible = false
node_variables.user_menu.visible = true
node_variables.daily_prompts.visible = false
func show_daily_prompts():
node_variables.main_screen.visible = true
node_variables.start_menu.visible = false
node_variables.user_menu.visible = false
node_variables.daily_prompts.visible = true
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@ -23,8 +23,3 @@ func _ready():
else:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass