drafted pomodoro app

This commit is contained in:
Jaap Marsman 2022-08-21 16:34:39 +08:00
parent b52041d6d1
commit 6287420f21
4 changed files with 30 additions and 20 deletions

5
godot/apps/pomodoro.tscn Normal file
View File

@ -0,0 +1,5 @@
[gd_scene format=2]
[node name="pomodoro" type="CanvasLayer"]
[node name="25min_timer" type="Timer" parent="."]

View File

@ -4,6 +4,8 @@ extends CanvasLayer
onready var user_values = get_node("/root/UserValues") onready var user_values = get_node("/root/UserValues")
onready var program_values = get_node("/root/ProgramValues") onready var program_values = get_node("/root/ProgramValues")
var csv_url = "https://raw.githubusercontent.com/hobbesjaap/wellbeingapp/main/version_info.csv"
func _ready(): func _ready():
$version_label.text = "Version " + str(program_values.current_version) $version_label.text = "Version " + str(program_values.current_version)
@ -15,7 +17,7 @@ func _ready():
func _on_button_update_check_pressed(): 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(): func update_user_name_label():

View File

@ -37,25 +37,26 @@ theme = ExtResource( 5 )
custom_fonts/font = SubResource( 1 ) custom_fonts/font = SubResource( 1 )
text = "Version" text = "Version"
[node name="GridContainer" type="GridContainer" parent="."] [node name="GridContainer" type="HFlowContainer" parent="."]
margin_left = 10.0 margin_left = 10.0
margin_top = 55.0 margin_top = 55.0
margin_right = 1270.0 margin_right = 1270.0
margin_bottom = 665.0 margin_bottom = 665.0
columns = 2 size_flags_horizontal = 3
size_flags_vertical = 3
[node name="button_daily_action" type="Button" parent="GridContainer"] [node name="button_daily_action" type="Button" parent="GridContainer"]
margin_right = 626.0 margin_right = 262.0
margin_bottom = 198.0 margin_bottom = 34.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource( 5 ) theme = ExtResource( 5 )
text = "Daily Action" text = "Daily Action"
[node name="button_open_github" type="Button" parent="GridContainer"] [node name="button_open_github" type="Button" parent="GridContainer"]
margin_left = 634.0 margin_left = 270.0
margin_right = 1260.0 margin_right = 475.0
margin_bottom = 198.0 margin_bottom = 34.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource( 5 ) theme = ExtResource( 5 )
@ -63,9 +64,9 @@ text = "GitHub"
script = ExtResource( 4 ) script = ExtResource( 4 )
[node name="button_email_feedback" type="Button" parent="GridContainer"] [node name="button_email_feedback" type="Button" parent="GridContainer"]
margin_top = 206.0 margin_left = 483.0
margin_right = 626.0 margin_right = 715.0
margin_bottom = 404.0 margin_bottom = 34.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource( 5 ) theme = ExtResource( 5 )
@ -73,10 +74,9 @@ text = "Feedback"
script = ExtResource( 3 ) script = ExtResource( 3 )
[node name="button_name" type="Button" parent="GridContainer"] [node name="button_name" type="Button" parent="GridContainer"]
margin_left = 634.0 margin_left = 723.0
margin_top = 206.0 margin_right = 913.0
margin_right = 1260.0 margin_bottom = 34.0
margin_bottom = 404.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource( 5 ) theme = ExtResource( 5 )
@ -84,9 +84,9 @@ text = "Name"
script = ExtResource( 2 ) script = ExtResource( 2 )
[node name="button_update_check" type="Button" parent="GridContainer"] [node name="button_update_check" type="Button" parent="GridContainer"]
margin_top = 412.0 margin_left = 921.0
margin_right = 626.0 margin_right = 1257.0
margin_bottom = 610.0 margin_bottom = 34.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource( 5 ) theme = ExtResource( 5 )

View File

@ -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://main_screen.gd" type="Script" id=1]
[ext_resource path="res://user_details.tscn" type="PackedScene" id=2] [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://start_menu.tscn" type="PackedScene" id=3]
[ext_resource path="res://apps/daily_prompts.tscn" type="PackedScene" id=4] [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://wb_theme.tres" type="Theme" id=5]
[ext_resource path="res://apps/pomodoro.tscn" type="PackedScene" id=6]
[sub_resource type="StyleBoxFlat" id=1] [sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.862745, 0.435294, 0.329412, 1 ) bg_color = Color( 0.862745, 0.435294, 0.329412, 1 )
@ -37,13 +38,15 @@ margin_bottom = -48.0
theme = ExtResource( 5 ) theme = ExtResource( 5 )
[node name="start_menu" parent="UI/top_container" instance=ExtResource( 3 )] [node name="start_menu" parent="UI/top_container" instance=ExtResource( 3 )]
visible = false
[node name="user_details" parent="UI/top_container" instance=ExtResource( 2 )] [node name="user_details" parent="UI/top_container" instance=ExtResource( 2 )]
visible = false
[node name="daily_prompts" parent="UI/top_container" instance=ExtResource( 4 )] [node name="daily_prompts" parent="UI/top_container" instance=ExtResource( 4 )]
visible = false visible = false
[node name="pomodoro" parent="UI/top_container" instance=ExtResource( 6 )]
[node name="bottom_bar" type="Panel" parent="UI"] [node name="bottom_bar" type="Panel" parent="UI"]
anchor_top = 1.0 anchor_top = 1.0
anchor_right = 1.0 anchor_right = 1.0