%Click Unlock, to unlock extra features
%Click Help(video) for instructions
import GUI in "%oot/support/lib/GUI"
var button1,unlock:int
unlock:=0
var x,y,x1,y1,btn,cl,size:int
var done:int:=0
var k:array char of boolean
var u:char:=chr(200)
var d:char:=chr(208)
var q:char:=chr(113)
var a:char:=chr(97)
var o:char:=chr(111)
var p:char:=chr(112)
var enter:char:=chr(10)
var space:char:=chr(32)
var d2:char:=chr(100)
var l:char:=chr(108)
var s:char:=chr(115)
var picID :int
cl:=1
size:=3
var first,second,third,forth,fifth: int
var menuItem : array 1 .. 21 of int
var menuName : array 1 .. 21 of string (11) := init ("New", "Save", "Load", "White", "Black",
"Red" , "Blue", "Green", "---","Color Up","Color Down", "Small","Moderate", "Big", "---",
"Size Up", "Size Down","Load BMP","Load JPG","Help(video)","Unlock")
procedure MenuSelected
for i : 1 .. 21
if menuItem (i) = GUI.GetEventWidgetID then
if i=1 then
drawfillbox(0,0,maxx,maxy-20,white)
elsif i=2 then
picID:=Pic.New(0,0,maxx,maxy)
elsif i=3 then
Pic.Draw(picID,0,0,picMerge)
elsif i=4 then
cl:=white
elsif i=5 then
cl:=black
elsif i=6 then
cl:=brightred
elsif i=7 then
cl:=brightblue
elsif i=8 then
cl:=brightgreen
elsif i=10 then
cl:=cl+1
elsif i=11 then
cl:=cl-1
elsif i=12 then
size:=3
elsif i=13 then
size:=25
elsif i=14 then
size:=100
elsif i=16 then
size:=size+1
elsif i=17 then
size:=size-1
elsif i=18 then
var Pic2:int
Pic2:=Pic.FileNew("Backround.BMP")
Pic.Draw(Pic2,0,0,picMerge)
elsif i=19 then
var Pic3:int
Pic3:=Pic.FileNew("Backround.JPG")
Pic.Draw(Pic3,0,0,picMerge)
elsif i=20 then
if Sys.Exec ("help.avi")then
end if
elsif i=21 then
if Sys.Exec ("http://www.time2play.comuf.com")then
unlock:=1
GUI.Enable (forth)
GUI.Enable (first)
end if
end if
end if
end for
end MenuSelected
first:=GUI.CreateMenu("File")
for cnt : 1 .. 3
menuItem (cnt) := GUI.CreateMenuItem (menuName (cnt), MenuSelected)
end for
second:=GUI.CreateMenu("Color")
for cnt : 4 .. 11
menuItem (cnt) := GUI.CreateMenuItem (menuName (cnt), MenuSelected)
end for
third:=GUI.CreateMenu("Size")
for cnt : 12..17
menuItem (cnt) := GUI.CreateMenuItem (menuName (cnt), MenuSelected)
end for
forth:=GUI.CreateMenu("Extra Stuff")
for cnt : 18..20
menuItem (cnt) := GUI.CreateMenuItem (menuName (cnt), MenuSelected)
end for
fifth:=GUI.CreateMenu("Unlock")
for cnt : 21..21
menuItem (cnt) := GUI.CreateMenuItem (menuName (cnt), MenuSelected)
end for
picID:=Pic.New(0,0,maxx,maxy)
GUI.Disable (forth)
GUI.Disable (first)
loop
Mouse.Where(x,y,btn)
Input.KeyDown(k)
if k(u) then
if cl<200 then
cl:=cl+1
else
cl:=2
end if
elsif k(d) then
if cl>1 then
cl:=cl-1
else
cl:=200
end if
end if
if k(enter) then
drawfillbox(0,0,maxx,maxy-20,white)
end if
if btn=1 then
drawfilloval(x,y,size,size,cl)
end if
if k(a) then
size:=0
end if
if k(s) then
if unlock=1 then
picID:=Pic.New(0,0,maxx,maxy)
end if
end if
if k(o) then
x1:=x
y1:=y
loop
if btn=1 then
Draw.ThickLine(x1,y1,x,y,size,cl)
done:=1
end if
Mouse.Where(x,y,btn)
exit when done=1
end loop
done:=0
end if
if k(p) then
x1:=x
y1:=y
loop
if btn=1 then
drawfillbox(x1,y1,x,y,cl)
done:=1
end if
Mouse.Where(x,y,btn)
exit when done=1
end loop
done:=0
end if
if k(l) then
if unlock=1 then
Pic.Draw(picID,0,0,picMerge)
end if
end if
Text.LocateXY(maxx-140,maxy-15)
put"Size: ",size,", Color:"
drawbox(maxx-16,maxy-16,maxx-4,maxy-4,black)
drawfillbox(maxx-15,maxy-15,maxx-5,maxy-5,cl)
exit when GUI.ProcessEvent
end loop
|