Quote: "I made a little change to your code in your site .I hope you don't mind. "
Not at all! Variety is the spice of life... and paprika is a good one too.
Here's a very basic color slider finder thingy I made for my map editor. It could be shorter perhaps:
gosub Init
do
gosub DoMenu
gosub BoxGraphics
loop
Init:
Gray=rgb(128,128,128)
DkGray=rgb(28,28,28)
Black=rgb(0,0,0)
Red=rgb(255,0,0)
Green=rgb(0,255,0)
Blue=rgb(0,0,255)
sw#=screen width()
sh#=screen height()
box 0,0,sw#*.8,sh#*.4,DkGray,Gray,DkGray,Gray
box 20,30,275,33,DkGray,DkGray,Black,Black
box 20,90,275,93,DkGray,DkGray,Black,Black
box 20,150,275,153,DkGray,DkGray,Black,Black
box 20,28,275,30,Black,Black,Red,Red
box 20,88,275,90,Black,Black,Green,Green
box 20,148,275,150,Black,Black,Blue,Blue
ColorPanel=1:get image ColorPanel,0,0,sw#*.8,sh#*.4
Rcp=128:Gcp=128:Bcp=128
return
DoMenu:
ink Gray,0:MenuTouch=-1
if mousex()>19 and mousex()<276 then MenuTouch=0
if mousey()>=15 and mousey()<=45 then inc MenuTouch,10
if mousey()>=75 and mousey()<=105 then inc MenuTouch,20
if mousey()>=135 and mousey()<=165 then inc MenuTouch,30
if mouseclick()=1
if MenuTouch=10 then Rcp=mousex()-20
if MenuTouch=20 then Gcp=mousex()-20
if MenuTouch=30 then Bcp=mousex()-20
ENDIF
return
BoxGraphics:
paste image ColorPanel,0,0
center text 20+Rcp,25,"|"
center text 20+Gcp,85,"|"
center text 20+Bcp,145,"|"
ink Black,0:set cursor 281,21:print Rcp:ink rgb(Rcp,0,0),0:set cursor 280,20:print Rcp
ink Black,0:set cursor 281,81:print Gcp:ink rgb(0,Gcp,0),0:set cursor 280,80:print Gcp
ink Black,0:set cursor 281,141:print Bcp:ink rgb(0,0,Bcp),0:set cursor 280,140:print Bcp
Ucolor=rgb(Rcp,Gcp,Bcp)
box sw#*.5,sh#*.03,sw#*.78,sh#*.35,Ucolor,Ucolor,Ucolor,Ucolor
return

666GO†O666
