From 26032953ea27786fe4706f9bc82719444cfa968d Mon Sep 17 00:00:00 2001 From: Jaap Marsman Date: Mon, 8 Aug 2022 17:16:19 +0800 Subject: [PATCH] added csv folder for future spreadsheets to feed into cards etc --- godot/button_user_save.gd | 10 ++++++++++ godot/data/wellbeing_cards.csv | 20 ++++++++++++++++++++ godot/start_menu.gd | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 godot/data/wellbeing_cards.csv diff --git a/godot/button_user_save.gd b/godot/button_user_save.gd index f0fb41e..fa72b89 100644 --- a/godot/button_user_save.gd +++ b/godot/button_user_save.gd @@ -20,6 +20,7 @@ func _ready(): func _on_button_user_save_pressed(): # Store some values. +# Maybe this one only runs if there is no ini config.set_value("User", "user_name", user_name.text) user_info.user_first_name = user_name.text #config.set_value("Player1", "best_score", 10) @@ -27,8 +28,17 @@ func _on_button_user_save_pressed(): #config.set_value("Player2", "best_score", 9001) # Save it to a file (overwrite if already exists). +# Need to make sure I never lose any values I add. +# This seems to be a manual thing to program. +# So per value, make sure to read it upon load. +# And write it out again as well. + config.save("user://user.ini") main_screen.visible = true start_menu.visible = true user_menu.visible = false + +# Need to do a "This thing can't be empty" code +# Most likely here. A if .text = null, then, +# don't proceed. diff --git a/godot/data/wellbeing_cards.csv b/godot/data/wellbeing_cards.csv new file mode 100644 index 0000000..476abfc --- /dev/null +++ b/godot/data/wellbeing_cards.csv @@ -0,0 +1,20 @@ +id,category,title,description,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, +,,,,,,, \ No newline at end of file diff --git a/godot/start_menu.gd b/godot/start_menu.gd index 4263486..875564f 100644 --- a/godot/start_menu.gd +++ b/godot/start_menu.gd @@ -13,7 +13,7 @@ func _process(_delta): func _on_button_update_check_pressed(): - $HTTPRequest.request("https://raw.githubusercontent.com/hobbesjaap/wellbeingapp/main/version_stuff.csv") + $HTTPRequest.request("https://raw.githubusercontent.com/hobbesjaap/wellbeingapp/main/version_info.csv") func _on_HTTPRequest_request_completed(result, response_code, headers, body):