' ****************************
' *                          *
' *    PALETTE REQUESTER     *
' *                          *
' ****************************


screen 1,640,256,3,2
window 1,"LOTTO MASTER --> v4.1 Cm.. 1992 - Palette Req.",(0,1)-(631,242),0,1

palette 0,0,0,0	    ' Nero
palette 1,1,1,1     ' Bianco
palette 2,0,.75,1   ' Azzurro
palette 3,.7,.7,.7  ' Grigio Chiaro
palette 4,.6,.6,.6  ' Grigio Scuro
palette 5,0,0,1     ' Blu
palette 6,.7,0,0    ' Rosso
palette 7,1,1,0     ' Giallo

menu 1,0,1,"Project"
menu 1,1,1,"Load TAB"
menu 1,2,1,"Save TAB"
menu 1,3,0,"--------"
menu 1,4,1,"Palette "
menu 1,5,0,"--------"
menu 1,6,1,"About   "
menu 1,7,1,"Quit    "

menu 2,0,0,""
menu 3,0,0,""
menu 4,0,0,""

DrawScreen:

cls
paint (50,50),3
x1=10 : y1=4 : l1=148 : l2=104 : ltx=23 : lty=12
gosub bottonup
x1=10 :y1=112 :l1=312 : l2=126
gosub bottonup
x1=329 : y1=4 : l1=295 : l2=234
gosub bottonup
x1=333 : y1=6 : l1=287 : l2=195
gosub bottondown
x1=160 : y1=4 : l1=162 : l2=104
gosub bottonup
x1=164 : y1=6 : l1=154 : l2=11 : ltx=25 : lty=2
btex$="GIOCA NUMERI"
gosub bottonup
y1=22 : ltx=23 : lty=4
btex$="CANCELLA NUMERI"
gosub bottonup
y1=38 : ltx=24 : lty=6
btex$="MOSTRA NUMERI"
gosub bottonup
y1=54 : ltx=23 : lty=8
btex$="MODIFICA PUNTATE"
gosub bottonup
y1=70 : ltx=26 : lty=10
btex$="ESTRAZIONE"
gosub bottonup
x1=165 : y1=86 : l1=152 : l2=19
gosub conca
x1=334 : y1=222 : l1=283 : l2=12
btex$=""
gosub bottondown

DrawPAL:

locate 16,19 : color 0,3 : print "PALETTE"
locate 18,5 : print "R"
locate 20,5 : print "G"
locate 22,5 : print "B"
x1=48 : y1=135 : l1=160 : l2=11 : btex$=""
gosub bottondown
y1=151
gosub bottondown
y1=167
gosub bottondown

l1=32 : l2=16
for n=0 to 7
x1=40+(n*32)
y1=190
gosub botcolup
next n



PALREQ:



PalWAIT:
if mouse(0)=0 then PALREQ
goto PalWAIT

botcolUP:

x2=x1+l1-1
y2=y1+l2-1
line (x1,y1)-(x2,y2),n,bf
line (x1,y1)-(x2,y1),1
line (x1,y1)-(x1,y2),1
line (x1,y2)-(x2,y2),0
line (x2,y1)-(x2,y2),0
return

bottonUP:

x2=x1+l1-1
y2=y1+l2-1
line (x1,y1)-(x2,y2),3,bf
line (x1,y1)-(x2,y1),1
line (x1,y1)-(x1,y2),1
line (x1,y2)-(x2,y2),0
line (x2,y1)-(x2,y2),0
locate lty,ltx : color 0,3 : print btex$

return

bottonDOWN:

x2=x1+l1-1
y2=y1+l2-1
line (x1,y1)-(x2,y2),4,bf
line (x1,y1)-(x2,y1),0
line (x1,y1)-(x1,y2),0
line (x1,y2)-(x2,y2),1
line (x2,y1)-(x2,y2),1
locate lty,ltx : color 0,4 : print btex$

return

conca:

x2=x1+l1-1
y2=y1+l2-1
line (x1,y1)-(x2,y1),0
line (x1,y1)-(x1,y2),0
line (x1,y2)-(x2,y2),1
line (x2,y1)-(x2,y2),1

return
