10-21-2022, 03:53 PM
Another fun one is TIMER.
Code: (Select All)
CLS
SCREEN _NEWIMAGE(1200, 900, 32)
DIM SHARED DarkGreen&
DIM SHARED Yellow&
DIM SHARED Pink&
DarkGreen& = _RGB32(0, 129, 0)
Yellow& = _RGB(255, 255, 0)
Pink& = _RGB(216, 50, 166)
'Large background box
LINE (0, 0)-(1199, 50), Pink&, BF
SLEEP
c1 = 7
r1 = 7
c2 = 126
r2 = 46
'The 5 smaller box
LINE (c1, r1)-(c2, r2), DarkGreen&, BF
r1 = 51
r2 = 93
'The Drop Down
mydelay = .05 ' <====================
z = TIMER ' <====================
FOR DDwn = 1 TO 25
COLOR Yellow&
_PRINTSTRING (12, 15), "Opening Info"
LINE (c1, r1)-(c2, r2), DarkGreen&, BF
DO
_LIMIT 30 ' Cuts down on CPU usage.
IF z > TIMER THEN z = z - 86400 ' Midnight adjustment.
IF TIMER - z > mydelay THEN z = TIMER: EXIT DO
' Note: You could do other stuff here you couldn't do if a _DELAY statement was used.
LOOP
r1 = r1 + DDwn
r2 = r2 + DDwn
NEXT
SLEEP
Shoot first and shoot people who ask questions, later.