10-21-2022, 03:29 PM
Here is a bare bones of a drop down menu which I have been using. I have had to use a Slowing value to smooth out the speed at which the drop down occurs. I was wondering if there might be a better way to control the speed.
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
For DDwn = 1 To 25
Color Yellow&
_PrintString (12, 15), "Opening Info"
Line (c1, r1)-(c2, r2), DarkGreen&, BF
For slow = 1 To 10000000: Next
r1 = r1 + DDwn
r2 = r2 + DDwn
Next
Sleep
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
For DDwn = 1 To 25
Color Yellow&
_PrintString (12, 15), "Opening Info"
Line (c1, r1)-(c2, r2), DarkGreen&, BF
For slow = 1 To 10000000: Next
r1 = r1 + DDwn
r2 = r2 + DDwn
Next
Sleep