Drop Down Menu
#5
Now let' take the last example and use it as a GOSUB...

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 ' <====================
_KEYCLEAR

DO
    IF z > TIMER THEN z = z - 86400 ' Midnight adjustment.
    IF TIMER - z > mydelay THEN z = TIMER: GOSUB dropit
    LOCATE 20, 40: PRINT INT(RND * 100) + 1; "   ";
LOOP UNTIL LEN(INKEY$)
END

dropit:
DDwn = DDwn + 1
COLOR Yellow&
_PRINTSTRING (12, 15), "Opening Info"
LINE (c1, r1)-(c2, r2), DarkGreen&, BF
r1 = r1 + DDwn
r2 = r2 + DDwn
IF DDwn = 25 THEN DDwn = 0: r1 = 0: r2 = 0
RETURN

Pete
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)