Computer Science Canada colour picker |
Author: | Tank [ Thu Mar 20, 2003 12:10 pm ] |
Post subject: | colour picker |
var Direction : string (1) var I := 0 setscreen ("nocursor") loop colourback (I) cls colourback (blue) colour (white) put "Colour #", I:4:0, " " put "Press < or > (Q to quit) " .. getch (Direction) if Direction = "<" or Direction = "," then I := I - 2 end if I := I + 1 if I < 0 then I := 255 elsif I > 255 then I := 0 end if exit when Direction = "Q" or Direction ="q" end loop |
Author: | Asok [ Thu Mar 20, 2003 1:13 pm ] |
Post subject: | |
I award you 3 bits for sharing this, the reasons are, the code is fairly simple and you can press any key for the colour to increase when the only variable keys should be <,>, and q |
Author: | Delta [ Fri Mar 21, 2003 10:44 am ] |
Post subject: | Okay |
Nice... just your code is a little iffy not bad though. I do like the lack of lines that it contains. Good Job! ![]() I will post my colour changer in a couple days. |