From 25aba0028d8020a8cca79b1d3b53eb2530557596 Mon Sep 17 00:00:00 2001 From: Tabby <41929769+tabby-cat-nya@users.noreply.github.com> Date: Sat, 31 May 2025 13:03:59 +1000 Subject: [PATCH] solid progress --- .editorconfig | 4 + .gitattributes | 4 +- .gitignore | 3 + Sprites/Pause.pdn | Bin 0 -> 3862 bytes Sprites/offTask.pdn | Bin 0 -> 3919 bytes Sprites/offTask.png | Bin 0 -> 441 bytes Sprites/offTask.png.import | 34 ++++++ Sprites/offTaskHover.png | Bin 0 -> 439 bytes Sprites/offTaskHover.png.import | 34 ++++++ Sprites/offTaskPressed.png | Bin 0 -> 441 bytes Sprites/offTaskPressed.png.import | 34 ++++++ Sprites/paused.png | Bin 0 -> 403 bytes Sprites/paused.png.import | 34 ++++++ Sprites/pausedHover.png | Bin 0 -> 402 bytes Sprites/pausedHover.png.import | 34 ++++++ Sprites/pausedPressed.png | Bin 0 -> 406 bytes Sprites/pausedPressed.png.import | 34 ++++++ Sprites/statusIcon.pdn | Bin 0 -> 4029 bytes Sprites/statusIcon.png | Bin 0 -> 477 bytes Sprites/statusIcon.png.import | 34 ++++++ TitleBar.gd | 26 +++++ TitleBar.gd.uid | 1 + icon.svg | 1 + icon.svg.import | 37 +++++++ logic.gd | 126 ++++++++++++++++++++++ logic.gd.uid | 1 + main.tscn | 173 ++++++++++++++++++++++++++++++ project.godot | 30 ++++++ 28 files changed, 642 insertions(+), 2 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 Sprites/Pause.pdn create mode 100644 Sprites/offTask.pdn create mode 100644 Sprites/offTask.png create mode 100644 Sprites/offTask.png.import create mode 100644 Sprites/offTaskHover.png create mode 100644 Sprites/offTaskHover.png.import create mode 100644 Sprites/offTaskPressed.png create mode 100644 Sprites/offTaskPressed.png.import create mode 100644 Sprites/paused.png create mode 100644 Sprites/paused.png.import create mode 100644 Sprites/pausedHover.png create mode 100644 Sprites/pausedHover.png.import create mode 100644 Sprites/pausedPressed.png create mode 100644 Sprites/pausedPressed.png.import create mode 100644 Sprites/statusIcon.pdn create mode 100644 Sprites/statusIcon.png create mode 100644 Sprites/statusIcon.png.import create mode 100644 TitleBar.gd create mode 100644 TitleBar.gd.uid create mode 100644 icon.svg create mode 100644 icon.svg.import create mode 100644 logic.gd create mode 100644 logic.gd.uid create mode 100644 main.tscn create mode 100644 project.godot 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 0000000000000000000000000000000000000000..f613bd85a494f45aabe4731ad5b480827b394f1e GIT binary patch literal 3862 zcmd^B&2Jl35Z_JwwQWj6+q9*8bTL&qBsg|#=R=Cqu0Im@@Ex+GDWY<6Gljn}*G ze#CJvz=aDJ4u}I64u}i?14j=03tZp;9JnAMRjQCsnR#p1c4=ur;*_;K`)1yIznM2P zZ)P{LrTE$iv)EFNd{eFwzOAWFJr$14hWR?tYIVmO>vD%!b}Bp*=56_ysCP7{UImF} z8mVwH5{u467Gkl5NPKP~mIyB`Dz5FA&80=B?luqjmQhQEwQ733+>WlU)Jy@MQbnrg zq#BIU$O>XcDB{~(6BjmdAiP(ql%sjUvJ=Xzh=Q^qN-?;WGcA0kZsMrQ=S=fjxs8`Z5GIU=b3{4Y-jJGdcS>FW6+5pa`K)oR3bCq)5(#suv z8379oJttO0Q<^E&wi-fO%p{I7waltm)kPt_B51kQ?OMzfGIxZsxFJmnCq>~7SktPO z=Pi-?Q>aMQ_3~;mvz5=M!u<5o;&d<2)4dE@Vp#Yw%p-X4jnCK!kc|ylGn}mHl!z0_ z%8oq6_cG|o1e)SAuI{)NNg2d-ELor8H{1hVQ&vf5(`*nUWw^TTNBB!asHWmJiQxob z;*4fzHM?cnL=AY^>!-OL@Y0%loW?J^HnEDtkyWrM?~ta=_!wq%l${uaUc(Eprr8c2 zB@}w8(y?J_q`^xct&MDh20FC5Ix$w?(S8(WAcNOXQ-ck2HH-`&~8!!z6{kn!%H179(mABZ2t zPxl$F3AAJjLNhK{mfS%{PVQ;w?DGQxTf0v#4DiQZh4BIWQ{(K#0x5^Nzy*OIhkqX` zeIiWMj=iFMWLkl}qGsSL?P|Kp?Ul)~hSdxAC4zx9AG z3<1v~@Wm&A!LSzv9>=?iSBblXWCF;!k+IA08tM}n(<1%C_#gWOYPd33%+s3Flv}i< z(^k>4%oed6jo3lkwGL&4jMK@8|WU(8A+;=NbAY2Xt>dR*Ttp zad1b)GXwp>hC*)+PI<~H9R@%U?h2BtK>8K>6<}C&F!l5`7;vuw=`VN<7(Z_OcSd8$ z4IV(i)%BL|=AelZbkwvrVNaG!t10VU7Hy<X;4=erU!!e_`$^7jveAod72@t9_(Wu;NG zOxI9@W=mEyr^8WK6it<|*a>~7<(q(IN3IP9pJpZvH~OL%@W6HO$(g>_I39SGedPZE z3d}$3r%6VO)7~BvLNt6>%wn4AVdOBKF_(ry4vm{(F|{%5fg3=A)HHs^)6G0$zX#o@ zALbZ8X5>z@U`WBG5G_V~}c9u8I$?|FL=;OgBUZ(SOnT>AR`&0C`r56&kU=JQtd HKJNJo0N!XB literal 0 HcmV?d00001 diff --git a/Sprites/offTask.pdn b/Sprites/offTask.pdn new file mode 100644 index 0000000000000000000000000000000000000000..34ab311da65842926afbbbc53e489b9217e112fe GIT binary patch literal 3919 zcmd^B&2Jl35Z`V5*`_q~gO&o#)>K>)Y$yImEXAR_w&OaE7h4}xbY`&LPDJ20umDH0VGr*!37CX36M~jd282pX=y>?l(*X1H}l^6 z&3iNRW;PdJ4j4z6xmHC(xK zE{e5;ScRT|ET50@8T_hC`N#@(`1R#t!JpzaJy;IsQBY9w;uOq|-PmpK&2HpH6lTQ4 z4Y9BWKW!@!g4kX)dU%65W z*XlUdY_4t;*RC!Wiz**O0iWlS)x-ioAv1v_+3xW|68SWr0313_mq;6BV2~HGI8Ga# zX`Ob13g~=T7t0H6YjGx?+RuPCzTLA5PF$M@_dT#<0RVD zntV)1)QjnmSZ)>2h6!P@kXR7Y3)$see83ND?%;bthE!Va7I|q z`~6G%*<^gBDlRUyug+YL*8(viK=K>w6MMW`C@sWh3%PKllgU*zo{va^sq9-PD~hYx zLOK-NNTs44&Nn~j>ji|b7iseh3lGB_K*KM#(IY@|IZ0NGxN0mD!yA_jX_D(j+QWf1 z$;HfuVQM6*5Yy14#w3?BOAWc4CY=?vPL!x(HX3$>KRtx1mdz$n3T4LPwbqp?p62y}U$oE+fytW0DB_(%HL@&!^i#)8`k1UY(S2-Z zq+L~WY-eNzKY}SYD(>w9*^@Er!6I<4%Y`S}f%pBF8Rq+&dHwxBUi} z_;4H*LuRB-I`%!hsx0epgW&ijazozn8d5c|>ECi31yOtsMVwrTdIJ8ChigDGqE*%C zvvmlMAhqk~dfCt70lHnwes-!}C#^Hre}NSG28TbVy4OwHybLudih~0wtSj zff{Wo33#}!5~vdv;4eME6GMO@1jMU4GXOXXKooGc2MFir0uB@~3;5?A@W~veA@UG^Nv0(bCiw z(F~dBPTkaYq%s+!gA@H4a?BFY5;AJ_twPeB*@vKs$M))D^i2%t&OK0z(RXTaMbX*@ z+JkkuE)EV^$|)TNKoIv?BGRNWzW}5^;YDEVxbWX?8dI*b1P-rc zTeepQwbSRb;V%N)(;)g*SWauG} zW=K=jIzmG&*U@J9_A1n6=({ffv7;fLY)Xs>n<6#I-+v68SR>%Xqp~hY<$6_9O{L;g zTT)pzI&Nx;j9MWqRzllh`6po6Bj*R5Pa~7M8*R~ZxMLh_ap>Q)ShBmt0aS4c%ZjGC^bTbF+UC@pCVT`e3 zL_TE{<9ytT9mDEzafm_Sf=f^}YT=-}Ch0l)1LUfZ9inNZ0>f^W#Ym-j5WlRGqaP&D z4#{5zi#|l_v*-5%SS>oZ_MH8jPu>V#{%F4R*_U6BeRb>e(bxCi4&5sJdHdt>_b=T1 V{;e-AisPTUMwq)lelUwje*xX$fNTH& literal 0 HcmV?d00001 diff --git a/Sprites/offTask.png b/Sprites/offTask.png new file mode 100644 index 0000000000000000000000000000000000000000..5b7751154d3afe6105287a45f82de7047b0e6002 GIT binary patch literal 441 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|>0G|-o37Yq_{&|3Kg$mcBZh%9Dc;5!V$ zjK}j=qyPmaN?apKg7ec#$`gxH83GbB^GfvmTtgI0^$hile(z!422`^xHNrE^(^HFq z1IS@zkYZ$IU<9(ffLI#J2Dw^;kr^z`1Y{dBGJ$;&1!QNovw+33fNT&*0Ai4S7>#Br z1JK_S*cn)WDh!N_4Hy?dOavp@3Xlx~Oh9v(z$$|*Er2YjE<*zYknGE=-z-ku z%Bcb}9XwqeLo|YW`yII$6nG9V`~83Z+FVH<8Hs>dGAzoA8Dn`(^o`qiEksoINWNR} r@Qy-xC7bxK4;ro;ojwZx`mW61w1MI4g1q@=Aagxk{an^LB{Ts5T*Y3d literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..a18422abe8b12201833f9822ae7d9d8846259e9f GIT binary patch literal 439 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0G|-o|NsB52eKI$rb%<90V(E^Aiv=M{~4~I;svT@;4JWnEM{QfI}E~% z$MaXD00kvVTq8NS%G|>0G|-ohK7d!|NpNCav2ydZff@fQY&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu(>y)3 z7&w3&Rt70XRt82O%L|C5p=^+=H5i$};!HrcAtMvm7g0cVW;+X5JPXJMfdn81>4(v1 zmNEeSJ%OEp1*pQn$k>2!0mM|04%P(_lcoUKAixAPhY74Q$kGDHg6c9fFaXKEy!y@J z)UBKz>% literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..cf15b437c36636cc4dbc90ae06dfc366cad73c26 GIT binary patch literal 403 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL5ULAh?3y^w370~qEv=}#LT=BJwMkF1yemk zJ)_@yn70AdY)g&sO!M^AV&DLBSQ(@kSs56CEH5CIhO$Af(O_f-i!%Y)hKx*L*F^!@ zne8lK@hl)41QLK4q#s73S<1l7z%YTGfd#0-z{uEuaRJ0skPg-b5R;|=*&x6KG=~YS zGRV>b$b#xJG%x_kzP$R);?%92Dj?Iz)5S5w!aq5Mp|R-R|Abi~7kb$b#xJG%x_kzP$R);?%92Dj?I*)5S5w!aq5Mq3OQ^!y-@C9tDO=XLdxfXt_xJ zkpI=z$azXlIzfWLNVMf5qh8^w-3=iISqC;4Bs}=c)OvH~L_vlHobsZ7&!;>D8SLrm K=d#Wzp$P!CQB&gp literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..0dfb8b2550f1cd4dc30c22d87114908e79bbff38 GIT binary patch literal 406 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL5ULAh?3y^w370~qEv=}#LT=BJwMkF1yemk zJ)_@yn70AdY)g&sO!M^AV&DLBSQ(@kSs56CEH5CIhO$Af(O_f-i!%Y)hKx*L*F^!@ zne8lK@hl)41QLK4q#s73S<1l7z%YTGfd#0-z{uEuaRJ0skPg-b5R;|=*&x6KG=~YS zGRV>b$b#xJG%x_kzP$R);?%92Dj?I<)5S5w!aq5Mp{cE{?Z3jT5QZzqIj;HWF}zG| zl5#UUV9-#wl|y1NbIhYF<%}y6t~5N%Jn;X5c|s3gL1*wACa%rJ%*qU#bpjqQ@PAVP OGThVE&t;ucLK6U@NmsJ~ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..7b4e3d3c9ffd543bee1e1b9cd0a78886bf51cb5f GIT binary patch literal 4029 zcmd^BO^n-A5VpHXHg302N=u>q)T9U`cFE5s*&nni*oiky)9h~k_J^tj$9ZwwBz9^$ zn`VVn4jhoUAi)8N10W&p2*Cx3@*@rv^Z?>dfLaa|2@nF6{|n2^bCzUF`IR{JS)S)N z@4av4&CHweLSiob%ob**Rnb#TStWc&tJt-eFFfw!YeZ9Pw)5SPyTr6&K44q&Dyb}K zc5M+jnxV&hQGX~n?w<~Yrv2f`=}^RXU`A^PeFD}mK($V-zDi!nb zfdeyvjQ|R4MCJj8g@<9*p<$10WDAgm1zFSWgkjGS+nnajE}b)cH1N| zowRLJZjA8@?Q%m?(xh83>O_y}?MB0m@Vhpl8cMrKblU?HTQw`8SuMjN6_0Z(-1N?P zoa@5Fs0L+tKB=)-ui4r`W;NAY^E$agJR>hGQ4bGA2* z8;u50Y`AWgKS^|AYKk9}UX&Yc0&wPi<42D4mga3!)73G)X(@);(8_&tMEpT~{@x1Z z$w@h?L?=Si;Rp#%O&=ZmKf#Y4If{p8xFH~X@8!T&4Ce;oM)sv`hHE@6*#y_@5KL3< zq9I318XEh`0fwcmk(~qMRVQ<~0REDGc6@=9!&u;kf#3-J??Ry$xrypg%E-qI(^JZ5 zI(A}PYgD*Wj;v~!C1De|*XzX-RpEVdKf~;OjA4e6K?55>hCaJ29PauVF7f4YR1BM; zI_bJs@v5?{hXcm;TgVBm>bGSzd?a|(vlUp08D#NV1?p`u>f;-bjC`R9A8&VCgw|aO z5c3t2v#qk8Z5Qf`#Z;o$&g3IqL5R_`$^HO#McaBtHc5$~lV$w^K-ZEBg>M@wo2z6M3TpvKM|Ai_v%W;Eueb2HJ!5 zdT$<_a)eX58Gz=&J+Onj7DzusUxy%QU~1{T@WEXVq`%+>7`Soczf&4h?r<3#UYT#X zZXHyy2o+UyCalpp!)(fp-Vk-9dftdKQO`>q8{=YAwf0z0EGxuqDY71fNf%`3O&-mV zreSu)hN0BaX87{G_W|g+n}E2{5Pxq%X4!T3IY=;nv7ZJR zO-`i}<3%)VEJiU6bsvr}oH3U8-unRb929Pb#n48#du{%YSCg#;`UB*xkSZ}vQh{lXWie72%+T1_VV-tK zpj{?^87%q`t8XY;%eP@)*Y6_psOb+WPee&v6Vtl6d>$caDE@+Wo?wox67i z-r&A?@TYCthCWowZ#{JUp~6ouD5uW7Eq?y&{?~uFbL_4+&t8A+i|@Vi{mGBtf8wz~ z>E-)>xp4l?_4CiKmv-O($`Vvcl5w)M1MG8<*qQo_#Bsf2=xp7@5K1OhC3FBNKxFkd6Z4%yt&AcovWi0trA2(hsB2 zEM)-tdjdNH3s8lDk+A{e0*I*~9jpr=CQSjdL4XNp4ii{qkfjBX1=VF}U;vVRdG(vc zsarW!KxT@ki(`m||J%t2xf%?3oS*;t|9_3=Dvq;eM`r&>SZebAg7bB!Er%pmM2V#C z5e>4O*UQMuWvSsI@!aIvA)V{XreCNw+x|}ci1ERXk`Mp-t~*~>vps@=iDz-btomRt fSHac67JWAuV**%Mi_`i0Kz4h&`njxgN@xNAwPklw literal 0 HcmV?d00001 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"