From 6287420f212df4055b4ac2ead6e2b7d052f8b50d Mon Sep 17 00:00:00 2001 From: Jaap Marsman Date: Sun, 21 Aug 2022 16:34:39 +0800 Subject: [PATCH] drafted pomodoro app --- godot/apps/pomodoro.tscn | 5 +++++ godot/start_menu.gd | 4 +++- godot/start_menu.tscn | 34 +++++++++++++++++----------------- godot/start_screen.tscn | 7 +++++-- 4 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 godot/apps/pomodoro.tscn diff --git a/godot/apps/pomodoro.tscn b/godot/apps/pomodoro.tscn new file mode 100644 index 0000000..bc8baf0 --- /dev/null +++ b/godot/apps/pomodoro.tscn @@ -0,0 +1,5 @@ +[gd_scene format=2] + +[node name="pomodoro" type="CanvasLayer"] + +[node name="25min_timer" type="Timer" parent="."] diff --git a/godot/start_menu.gd b/godot/start_menu.gd index 9c95639..58aa4ad 100644 --- a/godot/start_menu.gd +++ b/godot/start_menu.gd @@ -4,6 +4,8 @@ extends CanvasLayer onready var user_values = get_node("/root/UserValues") onready var program_values = get_node("/root/ProgramValues") +var csv_url = "https://raw.githubusercontent.com/hobbesjaap/wellbeingapp/main/version_info.csv" + func _ready(): $version_label.text = "Version " + str(program_values.current_version) @@ -15,7 +17,7 @@ func _ready(): func _on_button_update_check_pressed(): - $HTTPRequest.request("https://raw.githubusercontent.com/hobbesjaap/wellbeingapp/main/version_info.csv") + $HTTPRequest.request(csv_url) func update_user_name_label(): diff --git a/godot/start_menu.tscn b/godot/start_menu.tscn index 9fd9097..ada4738 100644 --- a/godot/start_menu.tscn +++ b/godot/start_menu.tscn @@ -37,25 +37,26 @@ theme = ExtResource( 5 ) custom_fonts/font = SubResource( 1 ) text = "Version" -[node name="GridContainer" type="GridContainer" parent="."] +[node name="GridContainer" type="HFlowContainer" parent="."] margin_left = 10.0 margin_top = 55.0 margin_right = 1270.0 margin_bottom = 665.0 -columns = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 [node name="button_daily_action" type="Button" parent="GridContainer"] -margin_right = 626.0 -margin_bottom = 198.0 +margin_right = 262.0 +margin_bottom = 34.0 size_flags_horizontal = 3 size_flags_vertical = 3 theme = ExtResource( 5 ) text = "Daily Action" [node name="button_open_github" type="Button" parent="GridContainer"] -margin_left = 634.0 -margin_right = 1260.0 -margin_bottom = 198.0 +margin_left = 270.0 +margin_right = 475.0 +margin_bottom = 34.0 size_flags_horizontal = 3 size_flags_vertical = 3 theme = ExtResource( 5 ) @@ -63,9 +64,9 @@ text = "GitHub" script = ExtResource( 4 ) [node name="button_email_feedback" type="Button" parent="GridContainer"] -margin_top = 206.0 -margin_right = 626.0 -margin_bottom = 404.0 +margin_left = 483.0 +margin_right = 715.0 +margin_bottom = 34.0 size_flags_horizontal = 3 size_flags_vertical = 3 theme = ExtResource( 5 ) @@ -73,10 +74,9 @@ text = "Feedback" script = ExtResource( 3 ) [node name="button_name" type="Button" parent="GridContainer"] -margin_left = 634.0 -margin_top = 206.0 -margin_right = 1260.0 -margin_bottom = 404.0 +margin_left = 723.0 +margin_right = 913.0 +margin_bottom = 34.0 size_flags_horizontal = 3 size_flags_vertical = 3 theme = ExtResource( 5 ) @@ -84,9 +84,9 @@ text = "Name" script = ExtResource( 2 ) [node name="button_update_check" type="Button" parent="GridContainer"] -margin_top = 412.0 -margin_right = 626.0 -margin_bottom = 610.0 +margin_left = 921.0 +margin_right = 1257.0 +margin_bottom = 34.0 size_flags_horizontal = 3 size_flags_vertical = 3 theme = ExtResource( 5 ) diff --git a/godot/start_screen.tscn b/godot/start_screen.tscn index b2969e8..e234c52 100644 --- a/godot/start_screen.tscn +++ b/godot/start_screen.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://main_screen.gd" type="Script" id=1] [ext_resource path="res://user_details.tscn" type="PackedScene" id=2] [ext_resource path="res://start_menu.tscn" type="PackedScene" id=3] [ext_resource path="res://apps/daily_prompts.tscn" type="PackedScene" id=4] [ext_resource path="res://wb_theme.tres" type="Theme" id=5] +[ext_resource path="res://apps/pomodoro.tscn" type="PackedScene" id=6] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0.862745, 0.435294, 0.329412, 1 ) @@ -37,13 +38,15 @@ margin_bottom = -48.0 theme = ExtResource( 5 ) [node name="start_menu" parent="UI/top_container" instance=ExtResource( 3 )] -visible = false [node name="user_details" parent="UI/top_container" instance=ExtResource( 2 )] +visible = false [node name="daily_prompts" parent="UI/top_container" instance=ExtResource( 4 )] visible = false +[node name="pomodoro" parent="UI/top_container" instance=ExtResource( 6 )] + [node name="bottom_bar" type="Panel" parent="UI"] anchor_top = 1.0 anchor_right = 1.0