Drop Down Menu
#4
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
If eggs are brain food, Biden takes his scrambled.
Reply


Messages In This Thread
Drop Down Menu - by Dimster - 10-21-2022, 03:29 PM
RE: Drop Down Menu - by SMcNeill - 10-21-2022, 03:37 PM
RE: Drop Down Menu - by Pete - 10-21-2022, 03:40 PM
RE: Drop Down Menu - by Pete - 10-21-2022, 03:53 PM
RE: Drop Down Menu - by Pete - 10-21-2022, 04:08 PM
RE: Drop Down Menu - by Dimster - 10-21-2022, 05:34 PM
RE: Drop Down Menu - by Pete - 10-21-2022, 05:58 PM
RE: Drop Down Menu - by Dimster - 10-21-2022, 06:14 PM



Users browsing this thread: 1 Guest(s)