To aid my creativity I have created a 'One-Hand' 24 hour clock to display on my desktop.
What is a 'one-hand' 24 hour clock I hear you ask !
Here is a clip from a website that sells these ( very expensive ) watches . . .
`A 24 hour one-hand watch allows you to see the entire day in one view and experience time in natural way. This fundamentally changes the way you look at your watch and it will give you a much better consciousness about the progression of your day.'
The idea is that you get more stuff done because your day is counting down ( only by one hand ) until the day has run out.
I was looking for an app and couldn't find one ( either free or not quit what I was looking for ) so I created my own in half a day with AGK.
Unfortunately I haven't found a way to keep it above ( on top of ) all other windows, but I find it very useful to aid my work flow and creativity etc.
Feel free to tinker with the code etc.
Hope it helps all you amazing devs in your creativity.
Enjoy.
// Project: One_Hand_24_Hour_Clock
// Created: 2022-02-08
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "One_Hand_24_Hour_Clock" )
SetWindowSize( 200, 200, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
`SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetDisplayAspect(1024/768) // Percentage based system
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
`= = = = = = = = = = = = = = = = VARIABLE = = = = = = = = = = = = = = = = = = = = =
global TimeStep as float
TimeStep=360/24
global CentreX as integer=50
global CentreY as integer=50
global HandSize as float=34
global Width as float
global Height as float
`= = = = = = = = = = = = = = = = GRAPHICS = = = = = = = = = = = = = = = = = = = = =
`>>> HAND SPRITE <<<
global HandSprID as integer
HandSprID=createsprite(0)
SetSpriteSize(HandSprID,HandSize,2)
SetSpriteOffset(HandSprID,0,0)
`>>> HOUR DOT <<<
HourDotID as integer[24]
for h=0 to 23
HandAngle#=(h*TimeStep)-90.0
Height=sin(HandAngle#)*(HandSize+12)
Width=cos(HandAngle#)*(HandSize+12)
`>>> NUMBERS <<<
t=CreateText(str(h))
FixTextToScreen(t,1)
SetTextPosition(t,CentreX+Width,(CentreY-4)+Height)
SetTextColor(t,255,255,255,255) `White
SetTextAlignment(t,1) `Centre allignment
SetTextsize(t,8)
Height=sin(HandAngle#)*(HandSize+5)
Width=cos(HandAngle#)*(HandSize+5)
`>>> DOT <<<
HourDotID[h]=createsprite(0)
SetSpriteSize(HourDotID[h],2,2)
SetSpriteOffset(HourDotID[h],1,1)
SetSpritePositionByOffset(HourDotID[h],CentreX+(Width),CentreY+(Height))
if h>6 and h<24
`>>> AVAILABLE HOURS FOR WORKING <<<
SetSpriteColor(HourDotID[h],0,255,0,255)
else
`>>> NONE AVAILABLE HOURS <<<
SetSpriteColor(HourDotID[h],255,255,255,255)
endif
next
`= = = = = = = = = = = = = = = = MAIN ROUTINE = = = = = = = = = = = = = = = = = = = = =
do
Timehour$=left(GetCurrentTime(),2)
Print(TimeHour$)
CurrentHour=val(left(GetCurrentTime(),2))
`for CurrentHour=0 to 23
HandAngle#=(CurrentHour*TimeStep)-90.0
`>>> DRAW HAND <<<
SetSpriteAngle(HandSprID,HandAngle#)
SetSpritePositionByOffset(HandSprID,CentreX,CentreY)
`sleep(200)
`sync()
`next
sync()
loop
Amazing creations start with a Fuzzy Vision
Dave - Creator, Developer and Visionary
Fuzzy Visions