setscreen ("offscreenonly")
colorback (black)
color (brightblue)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Variables %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
var pos : int := 214
var cursor : array char of boolean
var font : int := Font.New ("Comic Sans MS:20:Bold")
var font2 : int := Font.New ("Tahoma:11")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%End Variables %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Procedures %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Draw
procedure draw
delay (50)
Draw.Box (10, 10, maxx - 10, maxy - 10, white)
Draw.Box (9, 9, maxx - 9, maxy - 9, white)
Draw.Box (8, 8, maxx - 8, maxy - 8, white)
Draw.Box (7, 7, maxx - 7, maxy - 7, white)
Draw.Box (1, 1, maxx - 2, maxy - 1, white)
Draw.Oval (maxx div 2 + 60, pos, 4, 4, white)
Draw.FillOval (maxx div 2 + 60, pos, 1, 1, brightcyan)
Draw.Oval (maxx div 2 - 60, pos, 4, 4, white)
Draw.FillOval (maxx div 2 - 60, pos, 1, 1, brightcyan)
Draw.Line (maxx div 2 - 40, pos - 6, maxx div 2 + 40, pos - 6, white)
Draw.Line (maxx div 2 - 40, pos + 8, maxx div 2 + 40, pos + 8, white)
View.Update
end draw
%End Draw
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%End Procedures %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loop
delay (40)
cls
Draw.Text ("Head-to-Head", (maxx div 2) - 95, maxy div 2 + 55, font, brightcyan)
Draw.Text ("Battle V0.1", (maxx div 2) - 92, maxy div 2 + 40, font2, grey)
locate (maxrow div 2, maxcol div 2 - 4)
color (brightblue)
put "Two Player"
locate (maxrow div 2 + 1, maxcol div 2 - 4)
put "Practice"
locate (maxrow div 2 + 2, maxcol div 2 - 4)
put "Options"
locate (maxrow div 2 + 3, maxcol div 2 - 4)
put "High Score"
%Cursor Colour
if pos = 214 then
color (brightcyan)
locate (maxrow div 2, maxcol div 2 - 4)
put "Two Player"
elsif pos = 214-16 then
color (brightcyan)
locate (maxrow div 2 +1, maxcol div 2 - 4)
put "Practice"
elsif pos =214-32 then
color (brightcyan)
locate (maxrow div 2 +2, maxcol div 2 - 4)
put "Options"
else
color (brightcyan)
locate (maxrow div 2 +3, maxcol div 2 - 4)
put "High Score"
end if
Draw.Box ((maxx div 2) - 70, (maxy div 2) - 50, (maxx div 2) + 70, (maxy div 2) + 30, white)
Draw.Box ((maxx div 2) - 71, (maxy div 2) - 51, (maxx div 2) + 71, (maxy div 2) + 31, white)
draw
Input.KeyDown (cursor)
if cursor (KEY_UP_ARROW) then
if pos = 214 then
pos := 166
else
pos := pos + 16
end if
else
end if
if cursor (KEY_DOWN_ARROW) then
if pos = 166 then
pos := 214
else
pos := pos - 16
end if
else
end if
if cursor (KEY_ENTER) then
if pos = 214 then
elsif pos = 214 - 16 then
elsif pos = 214 - 32 then
elsif pos = 214 - 48 then
else
end if
else
end if
end loop
|