wellbeingapp/godot/start_menu.gd

23 lines
712 B
GDScript3
Raw Normal View History

2022-07-31 05:27:58 +00:00
extends Node2D
2022-08-03 01:01:10 +00:00
onready var user_info = get_node("/root/UserValues")
2022-08-07 01:08:10 +00:00
onready var program_info = get_node("/root/ProgramValues")
2022-07-31 05:27:58 +00:00
func _ready():
2022-08-08 08:53:39 +00:00
$HTTPRequest.connect("request_completed", self, "_on_request_completed")
2022-07-31 05:27:58 +00:00
2022-08-08 06:42:26 +00:00
func _process(_delta):
$welcome_title.text = "Good morning " + user_info.user_first_name + "!"
2022-08-08 08:53:39 +00:00
func _on_button_update_check_pressed():
$HTTPRequest.request("https://raw.githubusercontent.com/hobbesjaap/wellbeingapp/main/version_stuff.csv")
#func _on_HTTPRequest_request_completed(result, response_code, headers, body):
func _on_request_completed(result, response_code, headers, body):
var json = JSON.parse(body.get_string_from_utf8())
program_info.web_release_version = json.result