-
Notifications
You must be signed in to change notification settings - Fork 4
nClock
nClock allows you to create analog clocks.
To load the module, you should add a LoadModule line pointing to nClock in your LiteStep configuration.
LoadModule "$ModulesDir$nClock-0.7.dll"
Or, if you are using NetLoadModule
*NetLoadModule nClock-0.7
Make sure to load nCore before nClock, since nClock depends on the functionality exported by nCore.
You create a clock by using the *nClock command, like this:
*nClock ClockName
You can also create multiple clocks on a single line, like this:
*nClock ClockOne ClockTwo ClockThree
The clock is a Window whose prefix is the name of the clock. Each clock has 3 hands: the HourHand, the MinuteHand, and the SecondHand.
Boolean. When this is set to True, the HourHand will make one lap every 24 hours, instead of every 12 hours.
Default Value: False
Integer. Specifies how often the hands will move, in milliseconds.
Default Value: 1000
Each hand is a Brush, whose prefix is the name of the hand.
Float. How long this hand is.
Default Value: 50.0
Float. Where the hand begins, relative to the center of the clock.
Default Value: 0.0
Float. How thick the clock hand is.
Default Value: 3.0
Boolean. When this is set to true, this hand will move between clock ticks smoothly, rather than jumping to the closest clock tick.
Default Value: False
*nClock Clock
*nLabel ClockDot
Clock
{
X 0
Y 0
Width 100
Height 100
Color Green
; Default updaterate is 1 second
UpdateRate 500
; Switches to a 24hour dial
;24HourDial
HourHand
{
Color Black
Length 40
Thickness 4
SmoothMovement
}
MinuteHand
{
Color Black
Length 45
Thickness 2
SmoothMovement
}
SecondHand
{
Color Red
Length 55
Thickness 2
Offset -10
}
Dot
{
X $(@@Width - @Width)/2$
Y $(@@Height - @Height)/2$
Width 6
Height 6
CornerRadiusX $@Width$
CornerRadiusY $@Height$
Color Black
Parent @@
}
}