convert to Godot 3.5

This commit is contained in:
xananax prozaxx 2023-03-10 00:26:57 +04:00
parent bf3a9a35ce
commit 66b25bae97
36 changed files with 733 additions and 1468 deletions

21
.gitignore vendored
View File

@ -1,2 +1,19 @@
.godot/
exports/
# .gitignore generated by Hourglass
# For more information on what files should be excluded from version control,
# see <https://docs.godotengine.org/en/stable/getting_started/workflow/project_setup/version_control_systems.html#files-to-exclude-from-vcs>
.import/
export.cfg
# Excluded because it may contain sensitive information like keystore passwords
export_presets.cfg
# Exclude imported translations
*.translation
# Mono-specific
.mono/
data_*/
# Don't include those pesky .DS_Store files on macOS
.DS_Store

View File

@ -1,431 +0,0 @@
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
COOPERATIVE NON-VIOLENT PUBLIC LICENSE (\"LICENSE\"). THE WORK IS
PROTECTED BY COPYRIGHT AND ALL OTHER APPLICABLE LAWS. ANY USE OF THE
WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS
PROHIBITED. BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED IN THIS
LICENSE, YOU AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE
EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR
GRANTS YOU THE RIGHTS CONTAINED HERE IN AS CONSIDERATION FOR ACCEPTING
THE TERMS AND CONDITIONS OF THIS LICENSE AND FOR AGREEING TO BE BOUND BY
THE TERMS AND CONDITIONS OF THIS LICENSE.
# Definitions
An Act of War is any action of one country against any group either with
an intention to provoke a conflict or an action that occurs during a
declared war or during armed conflict between military forces of any
origin. This includes but is not limited to enforcing sanctions or
sieges, supplying armed forces, or profiting from the manufacture of
tools or weaponry used in military conflict.
An Adaptation is a work based upon the Work, or upon the Work and other
pre-existing works, such as a translation, adaptation, derivative work,
arrangement of music or other alterations of a literary or artistic
work, or phonogram or performance and includes cinematographic
adaptations or any other form in which the Work may be recast,
transformed, or adapted including in any form recognizably derived from
the original, except that a work that constitutes a Collection will not
be considered an Adaptation for the purpose of this License. For the
avoidance of doubt, where the Work is a musical work, performance or
phonogram, the synchronization of the Work in timed-relation with a
moving image (\"synching\") will be considered an Adaptation for the
purpose of this License. In addition, where the Work is designed to
output a neural network the output of the neural network will be
considered an Adaptation for the purpose of this license.
Bodily Harm is any physical hurt or injury to a person that interferes
with the health or comfort of the person and that is more than merely
transient or trifling in nature.
Distribute is to make available to the public the original and copies of
the Work or Adaptation, as appropriate, through sale, gift or any other
transfer of possession or ownership.
Incarceration is Confinement in a jail, prison, or any other place where
individuals of any kind are held against either their will or (if their
will cannot be determined) the will of their legal guardian or
guardians. In the case of a conflict between the will of the individual
and the will of their legal guardian or guardians, the will of the
individual will take precedence.
Licensor is The individual, individuals, entity, or entities that
offer(s) the Work under the terms of this License
Original Author is in the case of a literary or artistic work, the
individual, individuals, entity or entities who created the Work or if
no individual or entity can be identified, the publisher; and in
addition
- in the case of a performance the actors, singers, musicians,
dancers, and other persons who act, sing, deliver, declaim, play in,
interpret or otherwise perform literary or artistic works or
expressions of folklore;
- in the case of a phonogram the producer being the person or legal
entity who first fixes the sounds of a performance or other sounds;
and,
- in the case of broadcasts, the organization that transmits the
broadcast.
Work is the literary and/or artistic work offered under the terms of
this License including without limitation any production in the
literary, scientific and artistic domain, whatever may be the mode or
form of its expression including digital form, such as a book, pamphlet
and other writing; a lecture, address, sermon or other work of the same
nature; a dramatic or dramatico-musical work; a choreographic work or
entertainment in dumb show; a musical composition with or without words;
a cinematographic work to which are assimilated works expressed by a
process analogous to cinematography; a work of drawing, painting,
architecture, sculpture, engraving or lithography; a photographic work
to which are assimilated works expressed by a process analogous to
photography; a work of applied art; an illustration, map, plan, sketch
or three-dimensional work relative to geography, topography,
architecture or science; a performance; a broadcast; a phonogram; a
compilation of data to the extent it is protected as a copyrightable
work; or a work performed by a variety or circus performer to the extent
it is not otherwise considered a literary or artistic work.
You means an individual or entity exercising rights under this License
who has not previously violated the terms of this License with respect
to the Work, or who has received express permission from the Licensor to
exercise rights under this License despite a previous violation.
Publicly Perform means to perform public recitations of the Work and to
communicate to the public those public recitations, by any means or
process, including by wire or wireless means or public digital
performances; to make available to the public Works in such a way that
members of the public may access these Works from a place and at a place
individually chosen by them; to perform the Work to the public by any
means or process and the communication to the public of the performances
of the Work, including by public digital performance; to broadcast and
rebroadcast the Work by any means including signs, sounds or images.
Reproduce is to make copies of the Work by any means including without
limitation by sound or visual recordings and the right of fixation and
reproducing fixations of the Work, including storage of a protected
performance or phonogram in digital form or other electronic medium.
Software is any digital Work which, through use of a third-party piece
of Software or through the direct usage of itself on a computer system,
the memory of the computer is modified dynamically or semi-dynamically.
\"Software\", secondly, processes or interprets information.
Source Code is Any digital Work which, through use of a third-party
piece of Software or through the direct usage of itself on a computer
system, the memory of the computer is modified dynamically or
semi-dynamically. \"Software\", secondly, processes or interprets
information.
Surveilling is the use of the Work to either overtly or covertly observe
and record persons and or their activities.
A Network Service is the use of a piece of Software to interpret or
modify information that is subsequently and directly served to users
over the Internet.
To Discriminate is use of a work to differentiate between humans in a
such a way which prioritizes some above others on the basis of percieved
membership within certain groups.
Hate Speech is Communication or any form of expression which is solely
for the purpose of expressing hatred for some group or advocating a form
of Discrimination between humans.
Coercion is leveraging of the threat of force or use of force to
intimidate a person in order to gain compliance, or to offer large
incentives which aim to entice a person to act against their will.
# Fair Dealing Rights
Nothing in this License is intended to reduce, limit, or restrict any
uses free from copyright or rights arising from limitations or
exceptions that are provided for in connection with the copyright
protection under copyright law or other applicable laws.
# License Grant
Subject to the terms and conditions of this License, Licensor hereby
grants You a worldwide, royalty-free, non-exclusive, perpetual (for the
duration of the applicable copyright) license to exercise the rights in
the Work as stated below:
To Reproduce the Work, to incorporate the Work into one or more
Collections, and to Reproduce the Work as incorporated in the
Collections
To create and Reproduce Adaptations provided that any such Adaptation,
including any translation in any medium, takes reasonable steps to
clearly label, demarcate or otherwise identify that changes were made to
the original Work. For example, a translation could be marked \"The
original work was translated from English to Spanish,\" or a
modification could indicate \"The original work has been modified.\"
To Distribute and Publicly Perform the Work including as incorporated in
Collections.
To Distribute and Publicly Perform Adaptations. The above rights may be
exercised in all media and formats whether now known or hereafter
devised. The above rights include the right to make such modifications
as are technically necessary to exercise the rights in other media and
formats. This License constitutes the entire agreement between the
parties with respect to the Work licensed here. There are no
understandings, agreements or representations with respect to the Work
not specified here. Licensor shall not be bound by any additional
provisions that may appear in any communication from You. This License
may not be modified without the mutual written agreement of the Licensor
and You. All rights not expressly granted by Licensor are hereby
reserved, including but not limited to the rights set forth in
Non-waivable Compulsory License Schemes, Waivable Compulsory License
Schemes, and Voluntary License Schemes in the restrictions.
# Restrictions
The license granted in the license grant above is expressly made subject
to and limited by the following restrictions:
You may Distribute or Publicly Perform the Work only under the terms of
this License. You must include a copy of, or the Uniform Resource
Identifier (URI) for, this License with every copy of the Work You
Distribute or Publicly Perform. You may not offer or impose any terms on
the Work that restrict the terms of this License or the ability of the
recipient of the Work to exercise the rights granted to that recipient
under the terms of the License. You may not sublicense the Work. You
must keep intact all notices that refer to this License and to the
disclaimer of warranties with every copy of the Work You Distribute or
Publicly Perform. When You Distribute or Publicly Perform the Work, You
may not impose any effective technological measures on the Work that
restrict the ability of a recipient of the Work from You to exercise the
rights granted to that recipient under the terms of the License. This
Section applies to the Work as incorporated in a Collection, but this
does not require the Collection apart from the Work itself to be made
subject to the terms of this License. If You create a Collection, upon
notice from any Licensor You must, to the extent practicable, remove
from the Collection any credit as requested. If You create an
Adaptation, upon notice from any Licensor You must, to the extent
practicable, remove from the Adaptation any credit as requested.
If the Work meets the definition of Software, You may exercise the
rights granted in the license grant only if You provide a copy of the
corresponding Source Code from which the Work was derived in digital
form, or You provide a URI for the corresponding Source Code of the
Work, to any recipients upon request.
If the Work is used as or for a Network Service, You may exercise the
rights granted in the license grant only if You provide a copy of the
corresponding Source Code from which the Work was derived in digital
form, or You provide a URI for the corresponding Source Code to the
Work, to any recipients of the data served or modified by the Web
Service.
##
You may exercise the rights granted in the license grant for any
purposes only if:
i. You do not use the Work for the purpose of inflicting Bodily Harm on
human beings (subject to criminal prosecution or otherwise) outside
of providing medical aid or undergoing a voluntary procedure under
no form of Coercion.
ii. You do not use the Work for the purpose of Surveilling or tracking
individuals for financial gain.
iii. You do not use the Work in an Act of War.
iv. You do not use the Work for the purpose of supporting or profiting
from an Act of War.
v. You do not use the Work for the purpose of Incarceration.
vi. You do not use the Work for the purpose of extracting, processing,
or refining, oil, gas, or coal. Or to in any other way to
deliberately pollute the environment as a byproduct of manufacturing
or irresponsible disposal of hazardous materials.
vii. You do not use the Work for the purpose of expediting,
coordinating, or facilitating paid work undertaken by individuals
under the age of 12 years.
viii. You do not use the Work to either Discriminate or spread Hate
Speech on the basis of sex, sexual orientation, gender identity,
race, age, disability, color, national origin, religion, caste, or
lower economic status.
##
If You Distribute, or Publicly Perform the Work or any Adaptations or
Collections, You must, unless a request has been made by any Licensor to
remove credit from a Collection or Adaptation, keep intact all copyright
notices for the Work and provide, reasonable to the medium or means You
are utilizing:
i. the name of the Original Author (or pseudonym, if applicable) if
supplied, and/or if the Original Author and/or Licensor designate
another party or parties (e.g., a sponsor institute, publishing
entity, journal) for attribution (\"Attribution Parties\") in
Licensor\'s copyright notice, terms of service or by other
reasonable means, the name of such party or parties;
ii. the title of the Work if supplied;
iii. to the extent reasonably practicable, the URI, if any, that
Licensor to be associated with the Work, unless such URI does not
refer to the copyright notice or licensing information for the
Work; and,
iv. in the case of an Adaptation, a credit identifying the use of the
Work in the Adaptation (e.g., \"French translation of the Work by
Original Author,\" or \"Screenplay based on original Work by
Original Author\").
If any Licensor has sent notice to request removing credit, You must, to
the extent practicable, remove any credit as requested. The credit
required by this Section may be implemented in any reasonable manner;
provided, however, that in the case of an Adaptation or Collection, at a
minimum such credit will appear, if a credit for all contributing
authors of the Adaptation or Collection appears, then as part of these
credits and in a manner at least as prominent as the credits for the
other contributing authors. For the avoidance of doubt, You may only use
the credit required by this Section for the purpose of attribution in
the manner set out above and, by exercising Your rights under this
License, You may not implicitly or explicitly assert or imply any
connection with, sponsorship or endorsement by the Original Author,
Licensor and/or Attribution Parties, as appropriate, of You or Your use
of the Work, without the separate, express prior written permission of
the Original Author, Licensor and/or Attribution Parties.
Except as otherwise agreed in writing by the Licensor or as may be
otherwise permitted by applicable law, if You Reproduce, Distribute or
Publicly Perform the Work either by itself or as part of any Adaptations
or Collections, You must not distort, mutilate, modify or take other
derogatory action in relation to the Work which would be prejudicial to
the Original Author\'s honor or reputation. Licensor agrees that in
those jurisdictions (e.g. Japan), in which any exercise of the right
granted in the license grant of this License (the right to make
Adaptations) would be deemed to be a distortion, mutilation,
modification or other derogatory action prejudicial to the Original
Author\'s honor and reputation, the Licensor will waive or not assert,
as appropriate, this Section, to the fullest extent permitted by the
applicable national law, to enable You to reasonably exercise Your right
under the license grant of this License (right to make Adaptations) but
not otherwise.
Do not make any legal claim against anyone accusing the Work, with or
without changes, alone or with other works, of infringing any patent
claim.
# Representations Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
# Limitation on Liability
EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL
LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF
THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH DAMAGES.
# Termination
This License and the rights granted hereunder will terminate
automatically upon any breach by You of the terms of this License.
Individuals or entities who have received Adaptations or Collections
from You under this License, however, will not have their licenses
terminated provided such individuals or entities remain in full
compliance with those licenses. The Sections on definitions, fair
dealing rights, representations, warranties, and disclaimer, limitation
on liability, termination, and revised license versions will survive any
termination of this License.
Subject to the above terms and conditions, the license granted here is
perpetual (for the duration of the applicable copyright in the Work).
Notwithstanding the above, Licensor reserves the right to release the
Work under different license terms or to stop distributing the Work at
any time; provided, however that any such election will not serve to
withdraw this License (or any other license that has been, or is
required to be, granted under the terms of this License), and this
License will continue in full force and effect unless terminated as
stated above.
# Revised License Versions
This License may receive future revisions in the original spirit of the
license intended to strengthen This License. Each version of This
License has an incrementing version number.
Unless otherwise specified like in the below subsection The Licensor has
only granted this current version of This License for The Work. In this
case future revisions do not apply.
The Licensor may specify that the latest available revision of This
License be used for The Work by either explicitly writing so or by
suffixing the License URI with a \"+\" symbol.
The Licensor may specify that The Work is also available under the terms
of This License\'s current revision as well as specific future
revisions. The Licensor may do this by writing it explicitly or
suffixing the License URI with any additional version numbers each
separated by a comma.
# Miscellaneous
Each time You Distribute or Publicly Perform the Work or a Collection,
the Licensor offers to the recipient a license to the Work on the same
terms and conditions as the license granted to You under this License.
Each time You Distribute or Publicly Perform an Adaptation, Licensor
offers to the recipient a license to the original Work on the same terms
and conditions as the license granted to You under this License.
If the Work is classified as Software, each time You Distribute or
Publicly Perform an Adaptation, Licensor offers to the recipient a copy
and/or URI of the corresponding Source Code on the same terms and
conditions as the license granted to You under this License.
If the Work is used as a Network Service, each time You Distribute or
Publicly Perform an Adaptation, or serve data derived from the Software,
the Licensor offers to any recipients of the data a copy and/or URI of
the corresponding Source Code on the same terms and conditions as the
license granted to You under this License.
If any provision of this License is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of
the remainder of the terms of this License, and without further action
by the parties to this agreement, such provision shall be reformed to
the minimum extent necessary to make such provision valid and
enforceable.
No term or provision of this License shall be deemed waived and no
breach consented to unless such waiver or consent shall be in writing
and signed by the party to be charged with such waiver or consent.
This License constitutes the entire agreement between the parties with
respect to the Work licensed here. There are no understandings,
agreements or representations with respect to the Work not specified
here. Licensor shall not be bound by any additional provisions that may
appear in any communication from You. This License may not be modified
without the mutual written agreement of the Licensor and You.
The rights granted under, and the subject matter referenced, in this
License were drafted utilizing the terminology of the Berne Convention
for the Protection of Literary and Artistic Works (as amended on
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and
the Universal Copyright Convention (as revised on July 24, 1971). These
rights and subject matter take effect in the relevant jurisdiction in
which the License terms are sought to be enforced according to the
corresponding provisions of the implementation of those treaty
provisions in the applicable national law. If the standard suite of
rights granted under applicable copyright law includes additional rights
not granted under this License, such additional rights are deemed to be
included in the License; this License is not intended to restrict the
license of any rights under applicable law.

View File

@ -2,9 +2,7 @@
Track your time, save it to a CSV file.
![screenshot of the app](info/screenshot.png)
Uses Godot 4
Uses Godot 3.5
## Features

Binary file not shown.

View File

@ -1,9 +1,8 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cpmyyivxx0dlt"
path="res://.godot/imported/logo.png-e2220799298e3631eb0e245316e0501a.ctex"
type="StreamTexture"
path="res://.import/logo.png-e2220799298e3631eb0e245316e0501a.stex"
metadata={
"vram_texture": false
}
@ -11,24 +10,26 @@ metadata={
[deps]
source_file="res://assets/logo.png"
dest_files=["res://.godot/imported/logo.png-e2220799298e3631eb0e245316e0501a.ctex"]
dest_files=[ "res://.import/logo.png-e2220799298e3631eb0e245316e0501a.stex" ]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -1,9 +1,8 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fk5s6m8qlsei"
path="res://.godot/imported/logo.svg-01597fe4b7eb446be26a49e8a22b6f42.ctex"
type="StreamTexture"
path="res://.import/logo.svg-01597fe4b7eb446be26a49e8a22b6f42.stex"
metadata={
"vram_texture": false
}
@ -11,27 +10,26 @@ metadata={
[deps]
source_file="res://assets/logo.svg"
dest_files=["res://.godot/imported/logo.svg-01597fe4b7eb446be26a49e8a22b6f42.ctex"]
dest_files=[ "res://.import/logo.svg-01597fe4b7eb446be26a49e8a22b6f42.stex" ]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -1,9 +1,8 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bcledyqebmri"
path="res://.godot/imported/play.svg-1c68bc58d294f89383fc6b13dae7f4f1.ctex"
type="StreamTexture"
path="res://.import/play.svg-1c68bc58d294f89383fc6b13dae7f4f1.stex"
metadata={
"vram_texture": false
}
@ -11,27 +10,26 @@ metadata={
[deps]
source_file="res://assets/play.svg"
dest_files=["res://.godot/imported/play.svg-1c68bc58d294f89383fc6b13dae7f4f1.ctex"]
dest_files=[ "res://.import/play.svg-1c68bc58d294f89383fc6b13dae7f4f1.stex" ]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -1,19 +1,15 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cdsbhoidgyx70"
path="res://.godot/imported/pop.ogg-1ea32f2d825ac1e6d9420f3fecda89df.oggvorbisstr"
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/pop.ogg-1ea32f2d825ac1e6d9420f3fecda89df.oggstr"
[deps]
source_file="res://assets/pop.ogg"
dest_files=["res://.godot/imported/pop.ogg-1ea32f2d825ac1e6d9420f3fecda89df.oggvorbisstr"]
dest_files=[ "res://.import/pop.ogg-1ea32f2d825ac1e6d9420f3fecda89df.oggstr" ]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -1,9 +1,8 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c56y8w3k75rxc"
path="res://.godot/imported/stop.svg-fc65124eb2fb3129fbdd4f17f48ea6f3.ctex"
type="StreamTexture"
path="res://.import/stop.svg-fc65124eb2fb3129fbdd4f17f48ea6f3.stex"
metadata={
"vram_texture": false
}
@ -11,27 +10,26 @@ metadata={
[deps]
source_file="res://assets/stop.svg"
dest_files=["res://.godot/imported/stop.svg-fc65124eb2fb3129fbdd4f17f48ea6f3.ctex"]
dest_files=[ "res://.import/stop.svg-fc65124eb2fb3129fbdd4f17f48ea6f3.stex" ]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -1,9 +1,8 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctxkpfc0syh2m"
path="res://.godot/imported/tasks.svg-78ebb4f2e18a1507072d2a7762176d95.ctex"
type="StreamTexture"
path="res://.import/tasks.svg-78ebb4f2e18a1507072d2a7762176d95.stex"
metadata={
"vram_texture": false
}
@ -11,27 +10,26 @@ metadata={
[deps]
source_file="res://assets/tasks.svg"
dest_files=["res://.godot/imported/tasks.svg-78ebb4f2e18a1507072d2a7762176d95.ctex"]
dest_files=[ "res://.import/tasks.svg-78ebb4f2e18a1507072d2a7762176d95.stex" ]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -1,9 +1,8 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dskgsrua03gwe"
path="res://.godot/imported/wheel.svg-6ab291b0608b06b66eec00e4d4332248.ctex"
type="StreamTexture"
path="res://.import/wheel.svg-6ab291b0608b06b66eec00e4d4332248.stex"
metadata={
"vram_texture": false
}
@ -11,27 +10,26 @@ metadata={
[deps]
source_file="res://assets/wheel.svg"
dest_files=["res://.godot/imported/wheel.svg-6ab291b0608b06b66eec00e4d4332248.ctex"]
dest_files=[ "res://.import/wheel.svg-6ab291b0608b06b66eec00e4d4332248.stex" ]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 155 KiB

View File

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="ConfigManager" load_steps=2 format=3]
[gd_resource type="Resource" load_steps=2 format=2]
[ext_resource type="Script" path="res://scripts/config_manager.gd" id="1_xfu8y"]
[ext_resource path="res://scripts/config_manager.gd" type="Script" id=1]
[resource]
script = ExtResource("1_xfu8y")
script = ExtResource( 1 )

7
default_env.tres Normal file
View File

@ -0,0 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )

View File

@ -1,493 +0,0 @@
[preset.0]
name="Linux/X11"
platform="Linux/X11"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="exports/rat-times-x64.x86_64"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_encryption_key=""
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_script=1
binary_format/embed_pck=false
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
[preset.1]
name="macOS"
platform="macOS"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="exports/Rat Times.zip"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_encryption_key=""
[preset.1.options]
binary_format/architecture="universal"
custom_template/debug=""
custom_template/release=""
debug/export_console_script=1
application/icon="res://logo.icns"
application/icon_interpolation=4
application/bundle_identifier="org.mutnt.io.rat-times"
application/signature=""
application/app_category="Developer-tools"
application/short_version="1.0"
application/version="1.0"
application/copyright=""
application/copyright_localized={}
display/high_res=true
codesign/codesign=1
codesign/identity=""
codesign/certificate_file=""
codesign/certificate_password=""
codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false
codesign/entitlements/allow_dyld_environment_variables=false
codesign/entitlements/disable_library_validation=false
codesign/entitlements/audio_input=false
codesign/entitlements/camera=false
codesign/entitlements/location=false
codesign/entitlements/address_book=false
codesign/entitlements/calendars=false
codesign/entitlements/photos_library=false
codesign/entitlements/apple_events=false
codesign/entitlements/debugging=false
codesign/entitlements/app_sandbox/enabled=false
codesign/entitlements/app_sandbox/network_server=false
codesign/entitlements/app_sandbox/network_client=false
codesign/entitlements/app_sandbox/device_usb=false
codesign/entitlements/app_sandbox/device_bluetooth=false
codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0
codesign/entitlements/app_sandbox/helper_executables=[]
codesign/custom_options=PackedStringArray()
notarization/notarization=0
notarization/apple_id_name=""
notarization/apple_id_password=""
notarization/apple_team_id=""
notarization/api_uuid=""
notarization/api_key=""
notarization/api_key_id=""
privacy/microphone_usage_description=""
privacy/microphone_usage_description_localized={}
privacy/camera_usage_description=""
privacy/camera_usage_description_localized={}
privacy/location_usage_description=""
privacy/location_usage_description_localized={}
privacy/address_book_usage_description=""
privacy/address_book_usage_description_localized={}
privacy/calendar_usage_description=""
privacy/calendar_usage_description_localized={}
privacy/photos_library_usage_description=""
privacy/photos_library_usage_description_localized={}
privacy/desktop_folder_usage_description=""
privacy/desktop_folder_usage_description_localized={}
privacy/documents_folder_usage_description=""
privacy/documents_folder_usage_description_localized={}
privacy/downloads_folder_usage_description=""
privacy/downloads_folder_usage_description_localized={}
privacy/network_volumes_usage_description=""
privacy/network_volumes_usage_description_localized={}
privacy/removable_volumes_usage_description=""
privacy/removable_volumes_usage_description_localized={}
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
[preset.2]
name="Android"
platform="Android"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="exports/rat-times-x64.apk"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_encryption_key=""
[preset.2.options]
custom_template/debug=""
custom_template/release=""
gradle_build/use_gradle_build=false
gradle_build/export_format=0
gradle_build/min_sdk=""
gradle_build/target_sdk=""
architectures/armeabi-v7a=false
architectures/arm64-v8a=true
architectures/x86=false
architectures/x86_64=false
keystore/debug="res://assets/debug.keystore"
keystore/debug_user="android"
keystore/debug_password="android"
keystore/release=""
keystore/release_user=""
keystore/release_password=""
version/code=1
version/name="1.0"
package/unique_name="org.mutnt.io.ratstimes"
package/name=""
package/signed=true
package/app_category=2
package/retain_data_on_uninstall=false
package/exclude_from_recents=false
launcher_icons/main_192x192=""
launcher_icons/adaptive_foreground_432x432=""
launcher_icons/adaptive_background_432x432=""
graphics/opengl_debug=false
xr_features/xr_mode=0
xr_features/hand_tracking=0
xr_features/hand_tracking_frequency=0
xr_features/passthrough=0
screen/immersive_mode=true
screen/support_small=true
screen/support_normal=true
screen/support_large=true
screen/support_xlarge=true
user_data_backup/allow=false
command_line/extra_args=""
apk_expansion/enable=false
apk_expansion/SALT=""
apk_expansion/public_key=""
permissions/custom_permissions=PackedStringArray()
permissions/access_checkin_properties=false
permissions/access_coarse_location=false
permissions/access_fine_location=false
permissions/access_location_extra_commands=false
permissions/access_mock_location=false
permissions/access_network_state=false
permissions/access_surface_flinger=false
permissions/access_wifi_state=false
permissions/account_manager=false
permissions/add_voicemail=false
permissions/authenticate_accounts=false
permissions/battery_stats=false
permissions/bind_accessibility_service=false
permissions/bind_appwidget=false
permissions/bind_device_admin=false
permissions/bind_input_method=false
permissions/bind_nfc_service=false
permissions/bind_notification_listener_service=false
permissions/bind_print_service=false
permissions/bind_remoteviews=false
permissions/bind_text_service=false
permissions/bind_vpn_service=false
permissions/bind_wallpaper=false
permissions/bluetooth=false
permissions/bluetooth_admin=false
permissions/bluetooth_privileged=false
permissions/brick=false
permissions/broadcast_package_removed=false
permissions/broadcast_sms=false
permissions/broadcast_sticky=false
permissions/broadcast_wap_push=false
permissions/call_phone=false
permissions/call_privileged=false
permissions/camera=false
permissions/capture_audio_output=false
permissions/capture_secure_video_output=false
permissions/capture_video_output=false
permissions/change_component_enabled_state=false
permissions/change_configuration=false
permissions/change_network_state=false
permissions/change_wifi_multicast_state=false
permissions/change_wifi_state=false
permissions/clear_app_cache=false
permissions/clear_app_user_data=false
permissions/control_location_updates=false
permissions/delete_cache_files=false
permissions/delete_packages=false
permissions/device_power=false
permissions/diagnostic=false
permissions/disable_keyguard=false
permissions/dump=false
permissions/expand_status_bar=false
permissions/factory_test=false
permissions/flashlight=false
permissions/force_back=false
permissions/get_accounts=false
permissions/get_package_size=false
permissions/get_tasks=false
permissions/get_top_activity_info=false
permissions/global_search=false
permissions/hardware_test=false
permissions/inject_events=false
permissions/install_location_provider=false
permissions/install_packages=false
permissions/install_shortcut=false
permissions/internal_system_window=false
permissions/internet=false
permissions/kill_background_processes=false
permissions/location_hardware=false
permissions/manage_accounts=false
permissions/manage_app_tokens=false
permissions/manage_documents=false
permissions/manage_external_storage=false
permissions/master_clear=false
permissions/media_content_control=false
permissions/modify_audio_settings=false
permissions/modify_phone_state=false
permissions/mount_format_filesystems=false
permissions/mount_unmount_filesystems=false
permissions/nfc=false
permissions/persistent_activity=false
permissions/process_outgoing_calls=false
permissions/read_calendar=false
permissions/read_call_log=false
permissions/read_contacts=false
permissions/read_external_storage=false
permissions/read_frame_buffer=false
permissions/read_history_bookmarks=false
permissions/read_input_state=false
permissions/read_logs=false
permissions/read_phone_state=false
permissions/read_profile=false
permissions/read_sms=false
permissions/read_social_stream=false
permissions/read_sync_settings=false
permissions/read_sync_stats=false
permissions/read_user_dictionary=false
permissions/reboot=false
permissions/receive_boot_completed=false
permissions/receive_mms=false
permissions/receive_sms=false
permissions/receive_wap_push=false
permissions/record_audio=false
permissions/reorder_tasks=false
permissions/restart_packages=false
permissions/send_respond_via_message=false
permissions/send_sms=false
permissions/set_activity_watcher=false
permissions/set_alarm=false
permissions/set_always_finish=false
permissions/set_animation_scale=false
permissions/set_debug_app=false
permissions/set_orientation=false
permissions/set_pointer_speed=false
permissions/set_preferred_applications=false
permissions/set_process_limit=false
permissions/set_time=false
permissions/set_time_zone=false
permissions/set_wallpaper=false
permissions/set_wallpaper_hints=false
permissions/signal_persistent_processes=false
permissions/status_bar=false
permissions/subscribed_feeds_read=false
permissions/subscribed_feeds_write=false
permissions/system_alert_window=false
permissions/transmit_ir=false
permissions/uninstall_shortcut=false
permissions/update_device_stats=false
permissions/use_credentials=false
permissions/use_sip=false
permissions/vibrate=false
permissions/wake_lock=false
permissions/write_apn_settings=false
permissions/write_calendar=false
permissions/write_call_log=false
permissions/write_contacts=false
permissions/write_external_storage=false
permissions/write_gservices=false
permissions/write_history_bookmarks=false
permissions/write_profile=false
permissions/write_secure_settings=false
permissions/write_settings=false
permissions/write_sms=false
permissions/write_social_stream=false
permissions/write_sync_settings=false
permissions/write_user_dictionary=false
[preset.3]
name="iOS"
platform="iOS"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="exports/rat-times.ipa"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_encryption_key=""
[preset.3.options]
custom_template/debug=""
custom_template/release=""
architectures/arm64=true
application/app_store_team_id="org.mutnt.io"
application/provisioning_profile_uuid_debug=""
application/code_sign_identity_debug=""
application/export_method_debug=1
application/provisioning_profile_uuid_release=""
application/code_sign_identity_release=""
application/export_method_release=0
application/targeted_device_family=2
application/bundle_identifier="rat-times"
application/signature=""
application/short_version="1.0"
application/version="1.0"
application/icon_interpolation=4
application/launch_screens_interpolation=4
capabilities/access_wifi=false
capabilities/push_notifications=false
user_data/accessible_from_files_app=false
user_data/accessible_from_itunes_sharing=false
privacy/camera_usage_description=""
privacy/camera_usage_description_localized={}
privacy/microphone_usage_description=""
privacy/microphone_usage_description_localized={}
privacy/photolibrary_usage_description=""
privacy/photolibrary_usage_description_localized={}
icons/iphone_120x120=""
icons/iphone_180x180=""
icons/ipad_76x76=""
icons/ipad_152x152=""
icons/ipad_167x167=""
icons/app_store_1024x1024=""
icons/spotlight_40x40=""
icons/spotlight_80x80=""
icons/settings_58x58=""
icons/settings_87x87=""
icons/notification_40x40=""
icons/notification_60x60=""
storyboard/use_launch_screen_storyboard=false
storyboard/image_scale_mode=0
storyboard/custom_image@2x=""
storyboard/custom_image@3x=""
storyboard/use_custom_bg_color=false
storyboard/custom_bg_color=Color(0, 0, 0, 1)
landscape_launch_screens/iphone_2436x1125=""
landscape_launch_screens/iphone_2208x1242=""
landscape_launch_screens/ipad_1024x768=""
landscape_launch_screens/ipad_2048x1536=""
portrait_launch_screens/iphone_640x960=""
portrait_launch_screens/iphone_640x1136=""
portrait_launch_screens/iphone_750x1334=""
portrait_launch_screens/iphone_1125x2436=""
portrait_launch_screens/ipad_768x1024=""
portrait_launch_screens/ipad_1536x2048=""
portrait_launch_screens/iphone_1242x2208=""
[preset.4]
name="Windows Desktop"
platform="Windows Desktop"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="exports/rat-times-x64.exe"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_encryption_key=""
[preset.4.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_script=1
binary_format/embed_pck=false
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/identity_type=0
codesign/identity=""
codesign/password=""
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=false
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

35
icon.png.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

View File

@ -1,4 +1,4 @@
#!/usr/bin/env -S godot --headless -s
#!/usr/bin/env -S godot --no-window -s
extends SceneTree
var config: ConfigManager = preload("res://config_manager.tres")

View File

@ -6,39 +6,84 @@
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
config_version=4
_global_script_classes=[ {
"base": "Reference",
"class": "CMD",
"language": "GDScript",
"path": "res://scripts/cmd.gd"
}, {
"base": "Resource",
"class": "ConfigManager",
"language": "GDScript",
"path": "res://scripts/config_manager.gd"
}, {
"base": "Reference",
"class": "Consts",
"language": "GDScript",
"path": "res://scripts/consts.gd"
}, {
"base": "Reference",
"class": "FileWatcher",
"language": "GDScript",
"path": "res://scripts/file_watcher.gd"
}, {
"base": "Tree",
"class": "TimeEntriesItemsTree",
"language": "GDScript",
"path": "res://ui/tasks_list.gd"
}, {
"base": "Reference",
"class": "TimeEntry",
"language": "GDScript",
"path": "res://scripts/time_entry.gd"
}, {
"base": "Reference",
"class": "TimeSheet",
"language": "GDScript",
"path": "res://scripts/time_sheet.gd"
}, {
"base": "Reference",
"class": "TimeStamp",
"language": "GDScript",
"path": "res://scripts/time_stamp.gd"
} ]
_global_script_class_icons={
"CMD": "",
"ConfigManager": "",
"Consts": "",
"FileWatcher": "",
"TimeEntriesItemsTree": "",
"TimeEntry": "",
"TimeSheet": "",
"TimeStamp": ""
}
[application]
config/name="Rat Times"
config/description="Track your time(s)s"
run/main_scene="res://ui/Main.tscn"
config/use_custom_user_dir=true
config/custom_user_dir_name="rat_times"
config/features=PackedStringArray("4.0")
run/low_processor_mode=true
boot_splash/bg_color=Color(0.141176, 0.141176, 0.141176, 0)
boot_splash/show_image=false
config/icon="res://assets/logo.svg"
config/macos_native_icon="res://logo.icns"
config/windows_native_icon="res://logo.ico"
config/icon="res://assets/logo.png"
config/macos_native_icon="res://build/logo.icns"
config/windows_native_icon="res://build/logo.ico"
[display]
window/size/viewport_width=500
window/size/viewport_height=151
window/size/resizable=false
window/size/width=360
window/size/height=760
window/size/always_on_top=true
window/size/transparent=true
window/per_pixel_transparency/allowed=true
window/subwindows/embed_subwindows=false
[physics]
common/enable_pause_aware_picking=true
window/per_pixel_transparency/enabled=true
window/energy_saving/keep_screen_on=false
window/handheld/orientation="portrait"
window/ios/hide_home_indicator=false
[rendering]
textures/vram_compression/import_etc2_astc=true
viewport/transparent_background=true
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false
environment/default_environment="res://default_env.tres"

View File

@ -1,5 +1,15 @@
class_name CMD
var command_line_arguments: Dictionary = {}
func unsurround(value: String, quotes := PoolStringArray(['"', "'"])) -> String:
for quote_str in quotes:
if value.begins_with(quote_str) \
and value.ends_with(quote_str) \
and value[value.length() - 2] != "\\":
return value.trim_prefix(quote_str).trim_suffix(quote_str).strip_edges()
return value
## Returns a dictionary of all arguments passed after `--` on the command line
## arguments take one of 2 forms:
## - `--arg` which is a boolean (using `--no-arg` for `false` is possible)
@ -7,21 +17,14 @@ class_name CMD
## unsurround the string
## This function does no evaluation and does not attempt to guess the type of
## arguments. You will receive either bools, or strings.
var command_line_arguments: Dictionary = (func () -> Dictionary:
var unsurround := func unsurround(value: String, quotes := PackedStringArray(['"', "'"])) -> String:
for quote_str in quotes:
if value.begins_with(quote_str) \
and value.ends_with(quote_str) \
and value[value.length() - 2] != "\\":
return value.trim_prefix(quote_str).trim_suffix(quote_str).strip_edges()
return value
func _read_arguments() -> Dictionary:
var arguments := {}
for argument in OS.get_cmdline_user_args():
argument = argument.lstrip("--").to_lower()
for arg in OS.get_cmdline_args():
var argument: String = arg.lstrip("--").to_lower()
if argument.find("=") > -1:
var arg_tuple := argument.split("=")
var key := arg_tuple[0]
var value:String = unsurround.call(arg_tuple[1])
var value := unsurround(arg_tuple[1])
arguments[key] = value
else:
var key := argument
@ -30,10 +33,11 @@ var command_line_arguments: Dictionary = (func () -> Dictionary:
value = false
key = argument.lstrip("no-")
arguments[key] = value
return arguments).call()
return arguments
func get_argument(name: String, default: Variant = null) -> Variant:
func get_argument(name: String, default = null):
if command_line_arguments.has(name):
return command_line_arguments[name]
return default

View File

@ -1,48 +1,78 @@
class_name ConfigManager extends Resource
signal entry_started
signal entry_stopped
signal file_changed
const CONFIG_PATH := "user://settings.cfg"
var _config := ConfigFile.new()
var _watcher: FileWatcher
var timesheet: TimeSheet setget ,get_timesheet
func get_timesheet() -> TimeSheet:
if timesheet == null:
timesheet = _load_timesheet(get_current_file())
return timesheet
var timesheet: TimeSheet:
get:
if timesheet == null:
timesheet = TimeSheet.restore(current_file)
return timesheet
func _load_timesheet(path: String) -> TimeSheet:
timesheet = TimeSheet.restore(path)
if timesheet == null:
_watcher = null
return null
_watcher = FileWatcher.new()
_watcher.file_name = path
_watcher.start()
# warning-ignore:return_value_discarded
_watcher.connect("file_changed", self, "_on_file_changed")
# warning-ignore:return_value_discarded
timesheet.connect("entry_started", self, "_on_entry_started")
# warning-ignore:return_value_discarded
timesheet.connect("entry_stopped", self, "_on_entry_stopped")
return timesheet
signal file_changed
var current_file: String = "":
set = set_current_file,
get = get_current_file
func _on_entry_started() -> void:
emit_signal("entry_started")
func _on_entry_stopped() -> void:
emit_signal("entry_stopped")
func _on_file_changed() -> void:
emit_signal("file_changed")
var current_file: String = "" setget set_current_file, get_current_file
func set_current_file(value: String) -> void:
timesheet = TimeSheet.restore(value)
timesheet = _load_timesheet(value)
if timesheet == null:
return
current_file = value
_config.set_value("MAIN", "file", value)
file_changed.emit()
emit_signal("file_changed")
save()
func get_current_file() -> String:
var _default_path := OS.get_system_dir(OS.SYSTEM_DIR_DOCUMENTS, true).path_join("mouse_timer.csv")
var _default_path := OS.get_system_dir(OS.SYSTEM_DIR_DOCUMENTS, true).plus_file("mouse_timer.csv")
return _config.get_value("MAIN", "file", _default_path)
var theme: Theme:
get:
var theme: Theme setget , get_theme
func get_theme() -> Theme:
if theme == null:
theme = ResourceLoader.load(theme_path, "Theme")
return theme
signal theme_changed
var theme_path: String = "":
set = set_theme_path,
get = get_theme_path
var theme_path: String = "" setget set_theme_path, get_theme_path
func set_theme_path(value: String) -> void:
@ -51,7 +81,7 @@ func set_theme_path(value: String) -> void:
theme = new_theme
theme_path = value
_config.set_value("MAIN", "theme", value)
theme_changed.emit()
emit_signal("theme_changed")
save()
@ -59,27 +89,33 @@ func get_theme_path() -> String:
return _config.get_value("MAIN", "theme", preload("res://assets/default_theme.theme").resource_path)
var last_task_name: String = "":
set(value):
var last_task_name: String = "" setget set_last_task_name, get_last_task_name
func set_last_task_name(value: String) -> void:
last_task_name = value
_config.set_value("MAIN", "last_task_name", value)
save()
get:
func get_last_task_name() -> String:
return _config.get_value("MAIN", "last_task_name", "")
var sound_fx_on: bool = true:
set(value):
var sound_fx_on: bool = true setget set_sound_fx_on, get_sound_fx_on
func set_sound_fx_on(value: bool) -> void:
sound_fx_on = value
_config.set_value("MAIN", "sound_fx_on", value)
save()
get:
func get_sound_fx_on() -> bool:
return _config.get_value("MAIN", "sound_fx", true)
func _init() -> void:
# warning-ignore:return_value_discarded
_config.load(CONFIG_PATH)
func save() -> void:
# warning-ignore:return_value_discarded
_config.save(CONFIG_PATH)

60
scripts/file_watcher.gd Normal file
View File

@ -0,0 +1,60 @@
class_name FileWatcher
signal file_changed
var file_name: String setget set_file_name
var scan_delay_s: float = 1.0 setget set_scan_delay_s
var _file := File.new()
var _last_modified: int = 0
var _timer := Timer.new()
func _init() -> void:
# warning-ignore:return_value_discarded
_timer.connect("timeout", self, "check")
_timer.wait_time = scan_delay_s
func set_file_name(new_file_name: String) -> void:
if file_name == new_file_name:
return
file_name = new_file_name
if file_name.begins_with("res://") or file_name.begins_with("user://"):
file_name = ProjectSettings.globalize_path(file_name)
_last_modified = _file.get_modified_time(file_name)
_timer.name = "__file_watcher_%s"%[file_name]
func set_scan_delay_s(new_scan_delay_s: float) -> void:
scan_delay_s = new_scan_delay_s
_timer.wait_time = scan_delay_s
func check() -> void:
if file_name == "":
return
var new_modified := _file.get_modified_time(file_name)
if new_modified != _last_modified:
_last_modified = new_modified
emit_signal("file_changed")
func start() -> void:
if not _timer.is_inside_tree():
var main_loop: SceneTree = Engine.get_main_loop()
var root := main_loop.root
if root == null:
printerr("Called start before any scene is loaded")
return
if not root.is_inside_tree():
yield(root, "ready")
root.call_deferred("add_child", _timer, true)
yield(_timer, "ready")
_timer.start()
func stop() -> void:
_timer.stop()

View File

@ -31,47 +31,51 @@ func get_total_elapsed_seconds() -> int:
func get_period() -> String:
var time_in_secs := get_elapsed_seconds()
return TimeEntry.time_to_period(time_in_secs)
return time_to_period(time_in_secs)
func get_total_period() -> String:
var time_in_secs := get_total_elapsed_seconds()
return TimeEntry.time_to_period(time_in_secs)
return time_to_period(time_in_secs)
static func time_to_period(time_in_secs: int) -> String:
# warning-ignore:integer_division
var seconds := time_in_secs%60
@warning_ignore("integer_division")
# warning-ignore:integer_division
var minutes := (time_in_secs/60)%60
@warning_ignore("integer_division")
# warning-ignore:integer_division
var hours := (time_in_secs/60)/60
return "%02d:%02d:%02d" % [hours, minutes, seconds]
func to_csv_line() -> PackedStringArray:
return PackedStringArray([
func to_csv_line() -> PoolStringArray:
return PoolStringArray([
name,
start_time,
end_time,
str(get_elapsed_seconds()) if closed else tr(Consts.ONGOING)
])
static func is_csv_line_valid(line: PackedStringArray) -> bool:
static func is_csv_line_valid(line: PoolStringArray) -> bool:
return line.size() > 3
func from_csv_line(line: PackedStringArray) -> TimeEntry:
func from_csv_line(line: PoolStringArray) -> TimeEntry:
name = line[0]
var start_time_string = line[1]
# warning-ignore:return_value_discarded
start_time.from_string(start_time_string)
var elapsed_seconds = int(line[3]) if line[3].is_valid_int() else 0
var elapsed_seconds = int(line[3]) if line[3].is_valid_integer() else 0
closed = elapsed_seconds > 0
if closed == true:
var end_time_string = line[2]
# warning-ignore:return_value_discarded
end_time.from_string(end_time_string)
else:
# warning-ignore:return_value_discarded
end_time.from_current_time()
return self

View File

@ -1,17 +1,21 @@
class_name TimeSheet
signal entry_started
signal entry_stopped
var source_path := ""
var entries: Array[TimeEntry] = []
var entries := []
var entries_names := {}
var current_entry: TimeEntry
## Loads the data file
func load_file() -> bool:
var file := FileAccess.open(source_path, FileAccess.READ)
if file == null:
file = FileAccess.open(source_path, FileAccess.WRITE)
if file == null:
var file := File.new()
var success := file.open(source_path, File.READ)
if success != OK:
success = file.open(source_path, File.WRITE)
if success != OK:
printerr("Failed to open file %s"%[ProjectSettings.globalize_path(source_path)])
return false
return true
@ -40,12 +44,14 @@ func start_entry(entry_name: String) -> void:
current_entry.closed = false
if entry_name in entries_names:
current_entry.previous_total = entries_names[entry_name]
var file := FileAccess.open(source_path, FileAccess.READ_WRITE)
if file == null:
var file := File.new()
var success := file.open(source_path, File.READ_WRITE)
if success != OK:
printerr("Could not open file")
return
entries.append(current_entry)
file.store_csv_line(current_entry.to_csv_line())
emit_signal("entry_started")
func update() -> void:
@ -56,6 +62,7 @@ func update() -> void:
func close_entry() -> void:
current_entry.closed = true
save()
emit_signal("entry_stopped")
func get_period() -> String:
@ -67,8 +74,9 @@ func get_total_elapsed_seconds() -> int:
func save() -> void:
var file := FileAccess.open(source_path, FileAccess.WRITE)
if file == null:
var file := File.new()
var success := file.open(source_path, File.WRITE)
if success != OK:
printerr("Could not open file")
return
for time_entry in entries:
@ -76,9 +84,9 @@ func save() -> void:
static func restore(file_path: String) -> TimeSheet:
var timesheet := TimeSheet.new()
var timesheet = load("res://scripts/time_sheet.gd").new()
timesheet.source_path = file_path
var success := timesheet.load_file()
var success: bool = timesheet.load_file()
if success:
return timesheet
return null

View File

@ -1,118 +0,0 @@
extends Control
@onready var time_label: Label = %TimeLabel
@onready var start_button: Button = %StartButton
@onready var task_name_line_edit: LineEdit = %TaskNameLineEdit
@onready var time_entries_items_tree: TimeEntriesItemsTree = %TimeEntriesItemsTree
@onready var timer: Timer = %Timer
@onready var tasks_button: Button = %TasksButton
@onready var settings_button: Button = %SettingsButton
@onready var previous_tasks_window: Window = %PreviousTasksWindow
@onready var settings_window: Window = %SettingsWindow
@onready var audio_stream_player: AudioStreamPlayer = %AudioStreamPlayer
var config: ConfigManager = preload("res://config_manager.tres")
func _ready() -> void:
config.file_changed.connect(set_initial_state)
config.theme_changed.connect(
func theme_changed() -> void:
theme = config.them
)
get_tree().set_auto_accept_quit(false)
previous_tasks_window.hide()
settings_window.hide()
timer.timeout.connect(
func on_timer_timeout() -> void:
config.timesheet.update()
time_label.text = config.timesheet.get_period()
var total_elapsed: int = config.timesheet.get_total_elapsed_seconds()
time_entries_items_tree.set_time_elapsed(total_elapsed)
)
start_button.tooltip_text = tr(Consts.START)
start_button.toggle_mode = true
start_button.toggled.connect(
func start(is_on: bool) -> void:
if config.sound_fx_on:
audio_stream_player.play()
if is_on:
config.timesheet.start_entry(task_name_line_edit.text)
set_button_as_started()
else:
config.timesheet.close_entry()
set_button_as_stopped()
)
task_name_line_edit.text = config.last_task_name
task_name_line_edit.text_changed.connect(
func(new_text: String) -> void:
config.last_task_name = new_text
)
time_entries_items_tree.item_selected.connect(
func item_selected() -> void:
task_name_line_edit.text = time_entries_items_tree.get_current_text()
)
tasks_button.toggle_mode = true
tasks_button.toggled.connect(
func tasks_toggled(is_on: bool) -> void:
previous_tasks_window.visible = is_on
)
previous_tasks_window.close_requested.connect(
func close() -> void:
tasks_button.set_pressed_no_signal(false)
previous_tasks_window.hide()
)
settings_button.toggle_mode = true
settings_button.toggled.connect(
func settings_toggled(is_on: bool) -> void:
settings_window.visible = is_on
)
settings_window.close_requested.connect(
func close() -> void:
settings_button.set_pressed_no_signal(false)
settings_window.hide()
)
func set_button_as_started() -> void:
time_entries_items_tree.set_current_item(config.timesheet.current_entry.name)
start_button.tooltip_text = tr(Consts.STOP)
start_button.theme_type_variation = Consts.THEME_OVERRIDE_STOP
timer.start()
func set_button_as_stopped() -> void:
start_button.tooltip_text = tr(Consts.START)
time_label.text = Consts.NO_TIME
start_button.theme_type_variation = Consts.THEME_OVERRIDE_START
timer.stop()
func set_initial_state() -> void:
if config.timesheet.current_entry != null and config.timesheet.current_entry.closed == false:
start_button.set_pressed_no_signal(true)
set_button_as_started()
func _notification(what: int) -> void:
if what == NOTIFICATION_WM_CLOSE_REQUEST:
get_tree().quit()
## Unused; if a manual quit button is added, this would be used
func quit() -> void:
get_tree().notification(NOTIFICATION_WM_CLOSE_REQUEST)

View File

@ -1,132 +0,0 @@
[gd_scene load_steps=8 format=3 uid="uid://bmlciwscreowf"]
[ext_resource type="Theme" uid="uid://bd8ancgbfsvmd" path="res://assets/default_theme.theme" id="1_2s8h2"]
[ext_resource type="Script" path="res://ui/Main.gd" id="2_sl5q6"]
[ext_resource type="Script" path="res://ui/time_entries_items_tree.gd" id="3_oxqux"]
[ext_resource type="PackedScene" uid="uid://b07v41toqw355" path="res://ui/settings.tscn" id="4_4fa2j"]
[ext_resource type="AudioStream" uid="uid://cdsbhoidgyx70" path="res://assets/pop.ogg" id="4_6ajaq"]
[sub_resource type="InputEventKey" id="InputEventKey_guuii"]
device = -1
pressed = true
keycode = 32
unicode = 32
[sub_resource type="Shortcut" id="Shortcut_irhvi"]
events = [SubResource("InputEventKey_guuii")]
[node name="PanelContainer" type="PanelContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_2s8h2")
theme_type_variation = &"background"
[node name="Main" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 5
script = ExtResource("2_sl5q6")
[node name="VBoxContainer" type="VBoxContainer" parent="Main"]
layout_mode = 2
size_flags_horizontal = 3
[node name="HBoxContainer2" type="HBoxContainer" parent="Main/VBoxContainer"]
layout_mode = 2
[node name="SettingsButton" type="Button" parent="Main/VBoxContainer/HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
tooltip_text = "Settings"
theme_type_variation = &"settings_button"
icon_alignment = 1
[node name="TaskNameLineEdit" type="LineEdit" parent="Main/VBoxContainer/HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Task Name. Use \"/\" to create subtasks"
caret_blink = true
caret_blink_interval = 0.5
[node name="TasksButton" type="Button" parent="Main/VBoxContainer/HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
tooltip_text = "Tasks"
theme_type_variation = &"tasks_button"
icon_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Main/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="TimeLabel" type="Label" parent="Main/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
theme_type_variation = &"time_label"
text = "00:00:00"
horizontal_alignment = 1
vertical_alignment = 1
[node name="StartButton" type="Button" parent="Main/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_type_variation = &"play_button"
shortcut = SubResource("Shortcut_irhvi")
[node name="Timer" type="Timer" parent="Main"]
unique_name_in_owner = true
[node name="PreviousTasksWindow" type="Window" parent="Main"]
unique_name_in_owner = true
title = "Tasks"
size = Vector2i(300, 300)
visible = false
always_on_top = true
[node name="PanelContainer" type="PanelContainer" parent="Main/PreviousTasksWindow"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_type_variation = &"background"
[node name="MarginContainer" type="MarginContainer" parent="Main/PreviousTasksWindow/PanelContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 20
[node name="TimeEntriesItemsTree" type="Tree" parent="Main/PreviousTasksWindow/PanelContainer/MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
columns = 2
script = ExtResource("3_oxqux")
[node name="SettingsWindow" type="Window" parent="Main"]
unique_name_in_owner = true
title = "Settings"
size = Vector2i(300, 300)
visible = false
always_on_top = true
[node name="Settings" parent="Main/SettingsWindow" instance=ExtResource("4_4fa2j")]
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
stream = ExtResource("4_6ajaq")

45
ui/main.tscn Normal file
View File

@ -0,0 +1,45 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://ui/time_counter.tscn" type="PackedScene" id=1]
[ext_resource path="res://ui/tasks_list.tscn" type="PackedScene" id=2]
[ext_resource path="res://ui/settings.tscn" type="PackedScene" id=3]
[node name="VBoxContainer" type="VBoxContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
[node name="TimeCounter" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 360.0
margin_bottom = 48.0
[node name="TabContainer" type="TabContainer" parent="."]
margin_top = 52.0
margin_right = 360.0
margin_bottom = 760.0
size_flags_vertical = 3
[node name="TasksList" parent="TabContainer" instance=ExtResource( 2 )]
margin_left = 4.0
margin_top = 32.0
margin_right = -4.0
margin_bottom = -4.0
size_flags_horizontal = 3
[node name="Settings" type="ScrollContainer" parent="TabContainer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
margin_top = 32.0
margin_right = -4.0
margin_bottom = -4.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Settings" parent="TabContainer/Settings" instance=ExtResource( 3 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 352.0
margin_bottom = 672.0

View File

@ -1,59 +1,89 @@
extends PanelContainer
var config: ConfigManager = preload("res://config_manager.tres")
@onready var file_path_file_dialog: FileDialog = %FilePathFileDialog
@onready var file_path_line_edit: LineEdit = %FilePathLineEdit
@onready var file_path_button: Button = %FilePathButton
@onready var theme_path_file_dialog: FileDialog = %ThemePathFileDialog
@onready var theme_path_button: Button = %ThemePathButton
@onready var sound_check_box: CheckBox = %SoundCheckBox
@onready var attributions_rich_text_label: RichTextLabel = %AttributionsRichTextLabel
@onready var open_data_dir_button: Button = %OpenDataDirButton
onready var file_path_line_edit := $"%FilePathLineEdit" as LineEdit
onready var file_path_button := $"%FilePathButton" as Button
onready var theme_path_button := $"%ThemePathButton" as Button
onready var sound_check_box := $"%SoundCheckBox" as CheckBox
onready var open_data_dir_button := $"%OpenDataDirButton" as Button
onready var attributions_rich_text_label := $"%AttributionsRichTextLabel" as RichTextLabel
onready var file_path_file_dialog := $"%FilePathFileDialog" as FileDialog
onready var theme_path_file_dialog := $"%ThemePathFileDialog" as FileDialog
func _ready() -> void:
config.theme_changed.connect(
func set_current_theme() -> void:
theme = config.theme
)
# warning-ignore:return_value_discarded
config.connect("theme_changed", self, "_on_theme_changed")
config.file_changed.connect(
func set_current_file() -> void:
file_path_file_dialog.current_path = config.current_file
file_path_file_dialog.current_dir = config.current_file.get_base_dir()
file_path_line_edit.text = config.current_file
)
# warning-ignore:return_value_discarded
config.connect("file_changed", self, "_on_current_file_changed")
file_path_button.pressed.connect(
file_path_file_dialog.popup_centered
)
# warning-ignore:return_value_discarded
file_path_button.connect("pressed", self, "_on_file_path_button_pressed")
file_path_file_dialog.file_selected.connect(config.set_current_file)
file_path_line_edit.text_submitted.connect(config.set_current_file)
# warning-ignore:return_value_discarded
file_path_file_dialog.connect("file_selected", self, "_on_current_file_selected")
# warning-ignore:return_value_discarded
file_path_line_edit.connect("text_submitted", self, "_on_current_file_selected")
theme_path_button.pressed.connect(
theme_path_file_dialog.popup_centered
)
theme_path_file_dialog.file_selected.connect(config.set_theme_path)
theme_path_button.connected("pressed", self, "_on_theme_path_button_pressed")
theme_path_file_dialog.connected("file_selected", self, "_on_new_theme_selected")
theme_path_file_dialog.hide()
file_path_file_dialog.hide()
sound_check_box.button_pressed = config.sound_fx_on
sound_check_box.toggled.connect(
func sound_toggle(is_on: bool) -> void:
config.sound_fx_on = is_on
)
attributions_rich_text_label.meta_clicked.connect(OS.shell_open)
sound_check_box.pressed = config.sound_fx_on
open_data_dir_button.pressed.connect(
OS.shell_open.bind(OS.get_user_data_dir())
)
# warning-ignore:return_value_discarded
sound_check_box.connect("toggled", self, "_on_sound_toggle")
# warning-ignore:return_value_discarded
attributions_rich_text_label.connect("meta_clicked", self, "_on_attributions_rich_text_label_meta_clicked")
# warning-ignore:return_value_discarded
open_data_dir_button.connect("pressed", self, "_on_open_data_dir_button_pressed")
func _on_current_file_changed() -> void:
file_path_file_dialog.current_path = config.current_file
file_path_file_dialog.current_dir = config.current_file.get_base_dir()
file_path_line_edit.text = config.current_file
func _on_theme_changed() -> void:
theme = config.theme
func _on_file_path_button_pressed() -> void:
file_path_file_dialog.popup_centered()
func _on_current_file_selected(new_file: String) -> void:
config.set_current_file = new_file
func _on_sound_toggle(is_on: bool) -> void:
config.sound_fx_on = is_on
func _on_theme_path_button_pressed() -> void:
theme_path_file_dialog.popup_centered()
func _on_new_theme_selected(new_theme_path: String) -> void:
config.set_theme_path = new_theme_path
func _on_attributions_rich_text_label_meta_clicked(meta) -> void:
if meta is String:
# warning-ignore:return_value_discarded
OS.shell_open(meta)
func _on_open_data_dir_button_pressed() -> void:
# warning-ignore:return_value_discarded
OS.shell_open(OS.get_user_data_dir())

View File

@ -1,89 +1,110 @@
[gd_scene load_steps=2 format=3 uid="uid://b07v41toqw355"]
[gd_scene load_steps=2 format=2]
[ext_resource type="Script" path="res://ui/settings.gd" id="1_cmilf"]
[ext_resource path="res://ui/settings.gd" type="Script" id=1]
[node name="Settings" type="PanelContainer"]
anchors_preset = 15
[node name="Settings" type="MarginContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_type_variation = &"background"
script = ExtResource("1_cmilf")
script = ExtResource( 1 )
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_right = 360.0
margin_bottom = 760.0
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 20
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
margin_right = 360.0
margin_bottom = 24.0
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/separation = 10
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"]
margin_top = 5.0
margin_right = 55.0
margin_bottom = 19.0
text = "File Path"
[node name="FilePathLineEdit" type="LineEdit" parent="MarginContainer/VBoxContainer/HBoxContainer"]
[node name="FilePathLineEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
margin_left = 59.0
margin_right = 332.0
margin_bottom = 24.0
size_flags_horizontal = 3
caret_blink = true
caret_blink_interval = 0.5
caret_blink_speed = 0.5
[node name="FilePathButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"]
[node name="FilePathButton" type="Button" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
margin_left = 336.0
margin_right = 360.0
margin_bottom = 24.0
text = "..."
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
margin_top = 28.0
margin_right = 360.0
margin_bottom = 48.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
layout_mode = 2
text = "Alternative theme
"
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2"]
margin_top = 3.0
margin_right = 118.0
margin_bottom = 17.0
text = "Alternative Theme"
[node name="ThemePathButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
[node name="ThemePathButton" type="Button" parent="VBoxContainer/HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
margin_left = 122.0
margin_right = 161.0
margin_bottom = 20.0
text = "load"
[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
margin_top = 52.0
margin_right = 360.0
margin_bottom = 76.0
size_flags_horizontal = 3
[node name="SoundCheckBox" type="CheckBox" parent="MarginContainer/VBoxContainer/HBoxContainer3"]
[node name="SoundCheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer3"]
unique_name_in_owner = true
layout_mode = 2
button_pressed = true
text = "Sounds"
margin_right = 74.0
margin_bottom = 24.0
text = "sounds"
[node name="OpenDataDirButton" type="Button" parent="MarginContainer/VBoxContainer"]
[node name="OpenDataDirButton" type="Button" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "open data dir"
margin_top = 80.0
margin_right = 360.0
margin_bottom = 100.0
text = "Open data dir"
[node name="AttributionsRichTextLabel" type="RichTextLabel" parent="MarginContainer/VBoxContainer"]
[node name="AttributionsRichTextLabel" type="RichTextLabel" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
margin_top = 104.0
margin_right = 360.0
margin_bottom = 760.0
size_flags_vertical = 3
theme_type_variation = &"small_text"
bbcode_enabled = true
text = "Font: Cairo, Designed by Mohamed Gaber, Accademia di Belle Arti di Urbino
bbcode_text = "Font: Cairo, Designed by Mohamed Gaber, Accademia di Belle Arti di Urbino
Sound: [url]https://opengameart.org/content/bubbles-pop[/url]
This game uses Godot Engine, available under the following license:
Copyright (c) 2014-present Godot Engine contributors. Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"
text = "Font: Cairo, Designed by Mohamed Gaber, Accademia di Belle Arti di Urbino
Sound: https://opengameart.org/content/bubbles-pop
This game uses Godot Engine, available under the following license:
Copyright (c) 2014-present Godot Engine contributors. Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.
@ -97,17 +118,17 @@ This game uses Godot Engine, available under the following license:
[node name="FilePathFileDialog" type="FileDialog" parent="."]
unique_name_in_owner = true
title = "Pick Tracker File"
size = Vector2i(800, 600)
ok_button_text = "Save"
margin_right = 442.0
margin_bottom = 760.0
window_title = "Pick a file"
access = 2
filters = PackedStringArray("*.csv ; Comma Separated Files")
filters = PoolStringArray( "*.csv ; Comma Separated Files" )
[node name="ThemePathFileDialog" type="FileDialog" parent="."]
unique_name_in_owner = true
title = "Open a File"
size = Vector2i(800, 600)
ok_button_text = "Open"
file_mode = 0
margin_right = 360.0
margin_bottom = 760.0
window_title = "Open a File"
mode = 0
access = 2
filters = PackedStringArray("*.theme ; Theme Files")
filters = PoolStringArray( "*.theme ; Theme Files" )

View File

@ -10,7 +10,8 @@ var config: ConfigManager = preload("res://config_manager.tres")
var current_item: TreeItem
func _ready() -> void:
config.file_changed.connect(populate_entries)
# warning-ignore:return_value_discarded
config.connect("file_changed", self, "populate_entries")
populate_entries()
@ -19,6 +20,7 @@ func populate_entries() -> void:
var _root := create_item()
var entries_names := config.timesheet.entries_names
for entry_name in entries_names:
# warning-ignore:return_value_discarded
append_name_to_tree(entry_name, entries_names[entry_name])
@ -56,13 +58,27 @@ func append_name_to_tree(task_name: String, total_elapsed := 0) -> TreeItem:
return item
## Unecessary in Godot 4, can bre replaced with get_children()
static func _get_tree_item_children(item: TreeItem):
var children = []
var child = item.get_children()
if child == null:
return children
children.append(child)
child = child.get_next()
while child != null:
children.append(child)
child = child.get_next()
return children
## Finds an item in the tree by text
func find_item(root: TreeItem, item_name: String, or_create: bool) -> TreeItem:
for child in root.get_children():
for child in _get_tree_item_children(root):
if child.get_text(COL.TEXT) == item_name:
return child
if or_create:
var child := root.create_child()
var child := create_item(root)
child.set_text(COL.TEXT, item_name)
child.set_text(COL.TIME, Consts.NO_TIME)
return child

9
ui/tasks_list.tscn Normal file
View File

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://ui/tasks_list.gd" type="Script" id=1]
[node name="TasksList" type="Tree"]
anchor_right = 1.0
anchor_bottom = 1.0
columns = 2
script = ExtResource( 1 )

78
ui/time_counter.gd Normal file
View File

@ -0,0 +1,78 @@
extends VBoxContainer
var config: ConfigManager = preload("res://config_manager.tres")
onready var task_name_line_edit := $"%TaskNameLineEdit" as LineEdit
onready var time_label := $"%TimeLabel" as Label
onready var start_button := $"%StartButton" as Button
onready var timer := $"%Timer" as Timer
onready var audio_stream_player := $"%AudioStreamPlayer" as AudioStreamPlayer
func _ready() -> void:
# warning-ignore:return_value_discarded
timer.connect("timeout", self, "_on_timer_timeout")
start_button.tooltip_text = tr(Consts.START)
start_button.toggle_mode = true
# warning-ignore:return_value_discarded
start_button.connect("toggled", self, "_on_start_button_toggled")
task_name_line_edit.text = config.last_task_name
# warning-ignore:return_value_discarded
task_name_line_edit.connect("text_changed", self, "_on_task_name_line_edit_text_changed")
# warning-ignore:return_value_discarded
config.connect("entry_started", self, "set_button_as_started")
# warning-ignore:return_value_discarded
config.connect("entry_stopped", self, "set_button_as_stopped")
# TODO: connect this:
#time_entries_items_tree.item_selected.connect(
# func item_selected() -> void:
# task_name_line_edit.text = time_entries_items_tree.get_current_text()
#)
func _on_timer_timeout() -> void:
config.timesheet.update()
time_label.text = config.timesheet.get_period()
## TODO: change this
# var total_elapsed: int = config.timesheet.get_total_elapsed_seconds()
# time_entries_items_tree.set_time_elapsed(total_elapsed)
func _on_start_button_toggled(is_on: bool) -> void:
if config.sound_fx_on:
audio_stream_player.play()
if is_on:
config.timesheet.start_entry(task_name_line_edit.text)
else:
config.timesheet.close_entry()
func _on_task_name_line_edit_text_changed(new_text: String) -> void:
config.last_task_name = new_text
func set_button_as_stopped() -> void:
start_button.set_pressed_no_signal(false)
start_button.tooltip_text = tr(Consts.START)
time_label.text = Consts.NO_TIME
start_button.theme_type_variation = Consts.THEME_OVERRIDE_START
timer.stop()
func set_button_as_started() -> void:
## TODO: make this independent
# time_entries_items_tree.set_current_item(config.timesheet.current_entry.name)
start_button.set_pressed_no_signal(true)
start_button.tooltip_text = tr(Consts.STOP)
start_button.theme_type_variation = Consts.THEME_OVERRIDE_STOP
timer.start()
func set_initial_state() -> void:
if config.timesheet.current_entry != null and config.timesheet.current_entry.closed == false:
start_button.set_pressed_no_signal(true)
set_button_as_started()

39
ui/time_counter.tscn Normal file
View File

@ -0,0 +1,39 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://ui/time_counter.gd" type="Script" id=1]
[node name="TimeCounter" type="VBoxContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
[node name="TaskNameLineEdit" type="LineEdit" parent="."]
unique_name_in_owner = true
margin_right = 360.0
margin_bottom = 24.0
[node name="HBoxContainer" type="HBoxContainer" parent="."]
margin_top = 28.0
margin_right = 360.0
margin_bottom = 760.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="TimeLabel" type="Label" parent="HBoxContainer"]
unique_name_in_owner = true
margin_top = 359.0
margin_right = 344.0
margin_bottom = 373.0
size_flags_horizontal = 3
[node name="StartButton" type="Button" parent="HBoxContainer"]
unique_name_in_owner = true
margin_left = 348.0
margin_right = 360.0
margin_bottom = 732.0
[node name="Timer" type="Timer" parent="."]
unique_name_in_owner = true
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true