Hello... I have a small update to make to my code... NightX Thx for your function... but after a little trial and error i found another way to do it...and this way to me is easier... also uses less code... and therefor... faster.
Mad Nightmare... yes.. quite, but still i was just trying to make a point...
anyways... here is the code update and better commented...
Rem Start (Initialisation)
set text opaque
Ink RGB (0,230,0),0
login:
Print "Welcome to HTools"
print ""
print "Log In"
Input "Username:", name$: rem Username entry
Input "Password:", pass$: rem Password entry
input "Re-Type Password:", pass2$
if pass$ = pass2$
else
print "Passwords don't match"
sleep 2000
cls
gosub login
endif
lentgh = len(pass$):rem Turn Password into *
while len(pass$)< 20
pass$ = pass$+"*"
endwhile
pass1$ = right$(pass$,lentgh)
text 70,60,pass1$
text 135,75,pass1$
sleep 3000: rem Turn Password into * \end
cls
Print "Please Wait..."
sleep 2000
cls
rem End Start (Initialisation)
rem Main Loop
do
if Mission1 = 0
gosub mission1:
endif
gosub menu
loop
rem Main Loop end
REM ************
Rem Subroutines
REM ************
rem ******************
rem Subroutine
rem mission 1
rem ******************
mission1:
print "Welcome Officer ", name$
sleep 2000
print "534.2345.234 Attempting connection"
sleep 3000
print "Connection established..."
sleep 1000
cls
ink rgb (255,255,255),0
print "JTools Operator: Your task is to access Userlink mainframe"
sleep 3000
print "JTools Operator: Use any means to do this"
sleep 2000
ink rgb (0,230,0),0
cls
print "Connection terminated"
cls
rem ******************
rem Subroutine
rem Menu
rem *******************
menu:
cls
ink rgb (0,230,0),0
text 0,0,"1) Gatekeys"
text 0,15,"2) Comunications"
text 0,30,"3) Programs"
rem Menu if MouseClick
do
mx = mousex() : my = mousey() : mc = mouseclick()
rem ********************************************************************************************
rem Menu if MouseClicks
rem ********************************************************************************************
if mx > 0 and mx < 88 and my > 0 and my < 15 and mc = 1 :rem Menu if MouseClick on GateKeys
gosub menusel1
endif
if mx > 0 and mx < 100 and my > 16 and my < 30 and mc = 1 :rem Menu if MouseClick on Comunications
gosub menusel2
endif
if mx > 0 and mx < 100 and my > 31 and my < 45 and mc = 1 :rem Menu if MouseClick on Programs
gosub menusel3
endif
rem ********************************************************************************************
rem if MouseOvers
rem ********************************************************************************************
rem *************************
if mx > 0 and mx < 88 and my > 0 and my < 15 : rem if MouseOver Gatekeys
ink rgb (255,255,255),0: rem *************************
text 0,0,"1) Gatekeys"
else
ink rgb (0,230,0),0
text 0,0,"1) Gatekeys"
endif
rem *************************
if mx > 0 and mx < 100 and my > 16 and my < 30 : rem if MouseOver Comunications
ink rgb (255,255,255),0: rem *************************
text 0,15,"2) Comunications"
else
ink rgb (0,230,0),0
text 0,15,"2) Comunications"
endif
rem ********************
if mx > 0 and mx < 100 and my > 31 and my < 45: rem if MouseOver Programs
ink rgb (255,255,255),0: rem ********************
text 0,30,"3) Programs"
else
ink rgb (0,230,0),0
text 0,30,"3) Programs"
endif
loop
menusel1:
cls
print "SEL 1"
ink rgb(255,255,255),0
center text 320,460, "Press space to go back"
do
if keystate(57) = 1
gosub menu
else
endif
loop
menusel2:
cls
print "SEL 2"
ink rgb(255,255,255),0
center text 320,460, "Press space to go back"
do
if keystate(57) = 1
gosub menu
else
endif
loop
menusel3:
cls
ink rgb (0,230,0),0
print "SEL 3"
ink rgb(255,255,255),0
center text 320,460, "Press space to go back"
do
if keystate(57) = 1
gosub menu
else
endif
loop
The Winner has arrived. It's not me it's you.