diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/.gitattributes b/.gitattributes index dfe0770..8ad74f7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -# Auto detect text files and perform LF normalization -* text=auto +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0af181c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Godot 4+ specific ignores +.godot/ +/android/ diff --git a/Sprites/Pause.pdn b/Sprites/Pause.pdn new file mode 100644 index 0000000..f613bd8 Binary files /dev/null and b/Sprites/Pause.pdn differ diff --git a/Sprites/offTask.pdn b/Sprites/offTask.pdn new file mode 100644 index 0000000..34ab311 Binary files /dev/null and b/Sprites/offTask.pdn differ diff --git a/Sprites/offTask.png b/Sprites/offTask.png new file mode 100644 index 0000000..5b77511 Binary files /dev/null and b/Sprites/offTask.png differ diff --git a/Sprites/offTask.png.import b/Sprites/offTask.png.import new file mode 100644 index 0000000..12fe8f9 --- /dev/null +++ b/Sprites/offTask.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://brljmipci58rq" +path="res://.godot/imported/offTask.png-4088ef42c4e956c24345f79ce068106b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/offTask.png" +dest_files=["res://.godot/imported/offTask.png-4088ef42c4e956c24345f79ce068106b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/offTaskHover.png b/Sprites/offTaskHover.png new file mode 100644 index 0000000..a18422a Binary files /dev/null and b/Sprites/offTaskHover.png differ diff --git a/Sprites/offTaskHover.png.import b/Sprites/offTaskHover.png.import new file mode 100644 index 0000000..249e718 --- /dev/null +++ b/Sprites/offTaskHover.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://duvep02qg1u5d" +path="res://.godot/imported/offTaskHover.png-204a2399884ee63b4217e3d29749aa85.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/offTaskHover.png" +dest_files=["res://.godot/imported/offTaskHover.png-204a2399884ee63b4217e3d29749aa85.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/offTaskPressed.png b/Sprites/offTaskPressed.png new file mode 100644 index 0000000..06952c3 Binary files /dev/null and b/Sprites/offTaskPressed.png differ diff --git a/Sprites/offTaskPressed.png.import b/Sprites/offTaskPressed.png.import new file mode 100644 index 0000000..47aa0ea --- /dev/null +++ b/Sprites/offTaskPressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2hn0uem08y1x" +path="res://.godot/imported/offTaskPressed.png-62dd4b8b127a98f8dd4490862ecc477b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/offTaskPressed.png" +dest_files=["res://.godot/imported/offTaskPressed.png-62dd4b8b127a98f8dd4490862ecc477b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/paused.png b/Sprites/paused.png new file mode 100644 index 0000000..cf15b43 Binary files /dev/null and b/Sprites/paused.png differ diff --git a/Sprites/paused.png.import b/Sprites/paused.png.import new file mode 100644 index 0000000..451e388 --- /dev/null +++ b/Sprites/paused.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://buemgq8amjorw" +path="res://.godot/imported/paused.png-ea3edd41c02e88690e5027d82af3c668.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/paused.png" +dest_files=["res://.godot/imported/paused.png-ea3edd41c02e88690e5027d82af3c668.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/pausedHover.png b/Sprites/pausedHover.png new file mode 100644 index 0000000..a153b09 Binary files /dev/null and b/Sprites/pausedHover.png differ diff --git a/Sprites/pausedHover.png.import b/Sprites/pausedHover.png.import new file mode 100644 index 0000000..ae7ab10 --- /dev/null +++ b/Sprites/pausedHover.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdmqqnh3ofp8u" +path="res://.godot/imported/pausedHover.png-58a8e779a35e62cd8e888592ae048e05.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/pausedHover.png" +dest_files=["res://.godot/imported/pausedHover.png-58a8e779a35e62cd8e888592ae048e05.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/pausedPressed.png b/Sprites/pausedPressed.png new file mode 100644 index 0000000..0dfb8b2 Binary files /dev/null and b/Sprites/pausedPressed.png differ diff --git a/Sprites/pausedPressed.png.import b/Sprites/pausedPressed.png.import new file mode 100644 index 0000000..12d8f5e --- /dev/null +++ b/Sprites/pausedPressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b7kxpcujq3cqn" +path="res://.godot/imported/pausedPressed.png-e86f1d6be1518ed430556c08151d3173.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/pausedPressed.png" +dest_files=["res://.godot/imported/pausedPressed.png-e86f1d6be1518ed430556c08151d3173.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/statusIcon.pdn b/Sprites/statusIcon.pdn new file mode 100644 index 0000000..7b4e3d3 Binary files /dev/null and b/Sprites/statusIcon.pdn differ diff --git a/Sprites/statusIcon.png b/Sprites/statusIcon.png new file mode 100644 index 0000000..63f6d8c Binary files /dev/null and b/Sprites/statusIcon.png differ diff --git a/Sprites/statusIcon.png.import b/Sprites/statusIcon.png.import new file mode 100644 index 0000000..8fcfc3f --- /dev/null +++ b/Sprites/statusIcon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b502wtiwv20em" +path="res://.godot/imported/statusIcon.png-56aff46cca01790c3229dbdd9ca30440.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/statusIcon.png" +dest_files=["res://.godot/imported/statusIcon.png-56aff46cca01790c3229dbdd9ca30440.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/TitleBar.gd b/TitleBar.gd new file mode 100644 index 0000000..091e52f --- /dev/null +++ b/TitleBar.gd @@ -0,0 +1,26 @@ +extends Control + +var following = false +var dragging_start_position : Vector2i = Vector2i() + +func _on_TitleBar_gui_input(event): + if event is InputEventMouseButton: + #print(event) + if event.get_button_index() == 1: + following = !following + dragging_start_position = get_local_mouse_position() + +func _process(_delta): + if following: + get_window().position = get_window().position + Vector2i(get_global_mouse_position()) - dragging_start_position + #OS.set_window_position(OS.window_position + get_global_mouse_position() - dragging_start_position) + + +# +#func _on_CloseButton_pressed(): + #get_tree().quit() + + +#func _on_MinimizeButton_pressed(): + #OS.set_window_minimized(true) + diff --git a/TitleBar.gd.uid b/TitleBar.gd.uid new file mode 100644 index 0000000..56e37e6 --- /dev/null +++ b/TitleBar.gd.uid @@ -0,0 +1 @@ +uid://njpp5gvmxi7f diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..9d8b7fa --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..2f85bf0 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dlnt7jmsgs8x2" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/logic.gd b/logic.gd new file mode 100644 index 0000000..05b4816 --- /dev/null +++ b/logic.gd @@ -0,0 +1,126 @@ +extends Control + +enum State{ + Working, + OffTask, + Break +} + +@export var colors : Array[Color] + +@export_group("Node References") +@export var on_task_panel : Control +@export var off_task_panel : Control +@export var break_panel : Control +@export var background : ColorRect +@export var on_clock : RichTextLabel +@export var off_clock : RichTextLabel +@export var break_clock : RichTextLabel +@export var next_break_text : RichTextLabel +@export var time_spent_text : RichTextLabel + +var state : State = State.Working +var total_working_time : float = 0 +var total_off_time : float = 0 +var off_time : float = 0 +var break_time : float = 0 +var update : float = 0.5 + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + print(get_next_break_time()) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + update -= delta + background.color = colors[state] + on_task_panel.visible = state == State.Working + off_task_panel.visible = state == State.OffTask + break_panel.visible = state == State.Break + if(state == State.Working): + total_working_time += delta + time_spent_text.text = seconds_to_time(total_working_time) + " Spent working" + on_clock.text = get_next_break_time() + next_break_text.text = "Until " + get_next_break_name() + elif(state == State.OffTask): + off_time += delta + total_off_time += delta + #off_clock.text = "[wave amp="+str(off_time/5)+" freq="+str(off_time/20)+"]" + #off_clock.text += seconds_to_time(off_time,false) + elif(state == State.Break): + break_time += delta + break_clock.text = seconds_to_time(break_time,false) + + if(update <= 0): + update += 0.5 + off_clock.text = "[shake rate="+str(off_time/5)+" level="+str(off_time/20)+"]" + off_clock.text += seconds_to_time(off_time,false) + + +func _on_popup_menu_id_pressed(id: int) -> void: + # 0 = exit + if id == 0: + get_tree().quit() + pass # Replace with function body. + + +func _on_off_task_button_pressed() -> void: + if state == State.OffTask: + state = State.Working + else: + state = State.OffTask + off_time = 0 + + +func _on_pause_button_pressed() -> void: + if state == State.Break: + state = State.Working + else: + state = State.Break + break_time = 0 + +func get_next_break_name() -> String: + var currentUnix : int = Time.get_unix_time_from_system() + var timezone : Dictionary = Time.get_time_zone_from_system() + var todaysUnix : int = (currentUnix % 86400) + 60 * timezone.bias + # lunch at 46800 + # dinner at 64800 + if(todaysUnix < 46800): + return "Lunch" + elif(todaysUnix < 64800): + return "Dinner" + else: + return "Midnight" + +# returns the time reaming until next break int he format H:SS +func get_next_break_time() -> String: + # get current unix time + # use % to get the time since midnight - 86400 seconds in one day + var currentUnix : int = Time.get_unix_time_from_system() + var timezone : Dictionary = Time.get_time_zone_from_system() + var todaysUnix : int = (currentUnix % 86400) + 60 * timezone.bias + # lunch at 46800 + # dinner at 64800 + var seconds_to_break : int = 0 + if(todaysUnix < 46800): + seconds_to_break = 46800 - todaysUnix + elif(todaysUnix < 64800): + seconds_to_break = 64800 - todaysUnix + else: + seconds_to_break = 86400 - todaysUnix + + #print("Seconds " + str(seconds_to_break)) + return seconds_to_time(seconds_to_break) + +func seconds_to_time(seconds : int, has_hours : bool = true) -> String: + if(has_hours): + var hours : int = seconds / 3600 + var minutes : int = (seconds / 60) - hours * 60 + return str(hours).pad_zeros(2) + ":" + str(minutes).pad_zeros(2) + else: + var minutes : int = (seconds / 60) + var dSeconds : int = seconds - minutes * 60 + return str(minutes).pad_zeros(2) + ":" + str(dSeconds).pad_zeros(2) diff --git a/logic.gd.uid b/logic.gd.uid new file mode 100644 index 0000000..23615dc --- /dev/null +++ b/logic.gd.uid @@ -0,0 +1 @@ +uid://q31pnijofl0q diff --git a/main.tscn b/main.tscn new file mode 100644 index 0000000..c13b3f2 --- /dev/null +++ b/main.tscn @@ -0,0 +1,173 @@ +[gd_scene load_steps=10 format=3 uid="uid://df4wh83ypl085"] + +[ext_resource type="Script" uid="uid://q31pnijofl0q" path="res://logic.gd" id="1_0xm2m"] +[ext_resource type="Script" uid="uid://njpp5gvmxi7f" path="res://TitleBar.gd" id="1_ig7tw"] +[ext_resource type="Texture2D" uid="uid://brljmipci58rq" path="res://Sprites/offTask.png" id="3_7mycd"] +[ext_resource type="Texture2D" uid="uid://b502wtiwv20em" path="res://Sprites/statusIcon.png" id="3_h2yge"] +[ext_resource type="Texture2D" uid="uid://c2hn0uem08y1x" path="res://Sprites/offTaskPressed.png" id="4_272bh"] +[ext_resource type="Texture2D" uid="uid://duvep02qg1u5d" path="res://Sprites/offTaskHover.png" id="5_5vw27"] +[ext_resource type="Texture2D" uid="uid://buemgq8amjorw" path="res://Sprites/paused.png" id="6_kek77"] +[ext_resource type="Texture2D" uid="uid://b7kxpcujq3cqn" path="res://Sprites/pausedPressed.png" id="7_4c57u"] +[ext_resource type="Texture2D" uid="uid://cdmqqnh3ofp8u" path="res://Sprites/pausedHover.png" id="8_efxa6"] + +[node name="Control" type="Control" node_paths=PackedStringArray("on_task_panel", "off_task_panel", "break_panel", "background", "on_clock", "off_clock", "break_clock", "next_break_text", "time_spent_text")] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_0xm2m") +colors = Array[Color]([Color(0.321569, 0.321569, 0.321569, 1), Color(0.612149, 0, 0.151715, 1), Color(3.36915e-07, 0.391146, 0.157066, 1)]) +on_task_panel = NodePath("VBoxContainer/MainContent/OnTask") +off_task_panel = NodePath("VBoxContainer/MainContent/OffTask") +break_panel = NodePath("VBoxContainer/MainContent/Break") +background = NodePath("Background") +on_clock = NodePath("VBoxContainer/MainContent/OnTask/OnTaskClock") +off_clock = NodePath("VBoxContainer/MainContent/OffTask/OffTaskTimer") +break_clock = NodePath("VBoxContainer/MainContent/Break/BreakTimer") +next_break_text = NodePath("VBoxContainer/MainContent/OnTask/NextBreakText") +time_spent_text = NodePath("VBoxContainer/MainContent/OnTask/TimeSpentWorking") + +[node name="Background" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.321728, 0.321728, 0.321728, 1) + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TitleBar" type="PanelContainer" parent="VBoxContainer"] +layout_mode = 2 +script = ExtResource("1_ig7tw") + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TitleBar"] +layout_mode = 2 +alignment = 1 + +[node name="Label" type="Label" parent="VBoxContainer/TitleBar/HBoxContainer"] +layout_mode = 2 +text = "Focus Tool" + +[node name="MainContent" type="Control" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="OnTask" type="VBoxContainer" parent="VBoxContainer/MainContent"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 +alignment = 1 + +[node name="OnTaskClock" type="RichTextLabel" parent="VBoxContainer/MainContent/OnTask"] +layout_mode = 2 +theme_override_font_sizes/normal_font_size = 52 +text = "2:32" +fit_content = true +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="NextBreakText" type="RichTextLabel" parent="VBoxContainer/MainContent/OnTask"] +layout_mode = 2 +text = "Until Lunch" +fit_content = true +horizontal_alignment = 1 + +[node name="TimeSpentWorking" type="RichTextLabel" parent="VBoxContainer/MainContent/OnTask"] +layout_mode = 2 +theme_override_colors/default_color = Color(0.564962, 0.564962, 0.564962, 1) +text = "2:00 Spent working" +fit_content = true +horizontal_alignment = 1 + +[node name="OffTask" type="VBoxContainer" parent="VBoxContainer/MainContent"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 +alignment = 1 + +[node name="OffTaskTimer" type="RichTextLabel" parent="VBoxContainer/MainContent/OffTask"] +layout_mode = 2 +theme_override_font_sizes/normal_font_size = 52 +bbcode_enabled = true +text = "2:32" +fit_content = true +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Label" type="RichTextLabel" parent="VBoxContainer/MainContent/OffTask"] +layout_mode = 2 +text = "Off Task" +fit_content = true +horizontal_alignment = 1 + +[node name="Break" type="VBoxContainer" parent="VBoxContainer/MainContent"] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 +alignment = 1 + +[node name="BreakTimer" type="RichTextLabel" parent="VBoxContainer/MainContent/Break"] +layout_mode = 2 +theme_override_font_sizes/normal_font_size = 52 +text = "2:32" +fit_content = true +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Label" type="RichTextLabel" parent="VBoxContainer/MainContent/Break"] +layout_mode = 2 +text = "On Break" +fit_content = true +horizontal_alignment = 1 + +[node name="Buttons" type="HBoxContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="OffTaskButton" type="TextureButton" parent="VBoxContainer/Buttons"] +layout_mode = 2 +texture_normal = ExtResource("3_7mycd") +texture_pressed = ExtResource("4_272bh") +texture_hover = ExtResource("5_5vw27") + +[node name="PauseButton" type="TextureButton" parent="VBoxContainer/Buttons"] +layout_mode = 2 +texture_normal = ExtResource("6_kek77") +texture_pressed = ExtResource("7_4c57u") +texture_hover = ExtResource("8_efxa6") + +[node name="StatusIndicator" type="StatusIndicator" parent="."] +icon = ExtResource("3_h2yge") +menu = NodePath("PopupMenu") + +[node name="PopupMenu" type="PopupMenu" parent="StatusIndicator"] +item_count = 1 +item_0/text = "Exit" +item_0/id = 0 + +[connection signal="gui_input" from="VBoxContainer/TitleBar" to="VBoxContainer/TitleBar" method="_on_TitleBar_gui_input"] +[connection signal="pressed" from="VBoxContainer/Buttons/OffTaskButton" to="." method="_on_off_task_button_pressed"] +[connection signal="pressed" from="VBoxContainer/Buttons/PauseButton" to="." method="_on_pause_button_pressed"] +[connection signal="id_pressed" from="StatusIndicator/PopupMenu" to="." method="_on_popup_menu_id_pressed"] diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..e0d35dc --- /dev/null +++ b/project.godot @@ -0,0 +1,30 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Focus Tool" +run/main_scene="uid://df4wh83ypl085" +config/features=PackedStringArray("4.4", "GL Compatibility") +config/icon="res://icon.svg" + +[display] + +window/size/viewport_width=200 +window/size/viewport_height=180 +window/size/resizable=false +window/size/borderless=true +window/size/always_on_top=true + +[rendering] + +textures/canvas_textures/default_texture_filter=0 +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility"