%Car Ineterface
setscreen ("graphics:1000;700")
var picID3 : int
picID3 := Pic.FileNew ("welcomescreen.jpg")
Pic.Draw (picID3, 50, 50, picCopy)
drawbox (492, 312, 620, 159, black) %around the enter logo button
var music : boolean := true % regulates the music
process musik % Plays ""Do Ya Thang"
music := false
loop
exit when music
Music.PlayFile ("Do Ya Thang.mp3")
Music.PlayFileStop
end loop
end musik
var p, i, g : int % variables to track the mouse and mouse button
loop
mousewhere (p, i, g) % reads x/y mouse coordinates and button status
if p > 492 and i > 159 and p < 620 and i < 311 and g = 1 then
var picID1, picID2, picID4, picID5 : int
picID2 := Pic.FileNew ("ferrari-front-end-wallpaper.jpg")
picID4 := Pic.FileNew ("Picture1.jpg")
picID1 := Pic.FileNew ("Picture7 777copy.jpg")
Pic.Draw (picID2, 0, 0, picCopy)
delay (2000)
cls
Pic.Draw (picID4, 0, 0, picCopy)
delay (2000)
cls
%GUI.SetBackgroundColor (black)
Pic.Draw (picID1, 50, 50, picCopy)
drawbox (732, 230, 802, 148, white) %back
drawbox (731, 414, 802, 334, white) %forward
drawbox (712, 286, 644, 352, white) %forward left
drawbox (890, 288, 823, 355, white) %forward right
drawbox (717, 209, 651, 274, white) %forward left
drawbox (891, 215, 822, 282, white) %forward right
drawbox (818, 652, 740, 575, grey) %play button
drawbox (836, 652, 913, 575, grey) %stop button
%right bar decrease - left , increase right ,, up bar decrease - down , increase up ,, left bar decrease left, increase right,, down bar decrease down, increase up
var x, y, b : int := 1 % variables to track the mouse and mouse button
loop
mousewhere (x, y, b) % reads x/y mouse coordinates and button status (1=down)
if x > 733 and y > 148 and x < 802 and y < 230 and b = 1 then %back
%parallelput (15)
Draw.Text ("Back", 250, 220, Font.New ("Impact:25"), black)
delay (50)
drawfillbox (220, 300, 380, 140, white)
elsif x > 731 and y > 334 and x < 802 and y < 415 and b = 1 then %forward
Draw.Text ("Forward", 250, 220, Font.New ("Impact:25"), black)
delay (50)
drawfillbox (220, 300, 380, 140, white)
%parallelput (6)
elsif x > 644 and y > 286 and x < 712 and y < 352 and b = 1 then %forwardleft
Draw.Text ("Forward Left", 250, 220, Font.New ("Impact:25"), black)
delay (50)
drawfillbox (220, 300, 480, 140, white)
%parallelput (4)
elsif x > 823 and y > 288 and x < 890 and y < 355 and b = 1 then %forwardright
Draw.Text ("Forward Right", 250, 220, Font.New ("Impact:25"), black)
delay (50)
drawfillbox (220, 300, 480, 140, white)
%parallelput (10)
elsif x > 651 and y > 209 and x < 717 and y < 274 and b = 1 then %backleft
Draw.Text ("Back Left", 250, 220, Font.New ("Impact:25"), black)
delay (50)
drawfillbox (220, 300, 480, 140, white)
%parallelput (13)
elsif x > 822 and y > 215 and x < 891 and y < 282 and b = 1 then %backright
Draw.Text ("Back Right", 250, 220, Font.New ("Impact:25"), black)
delay (50)
drawfillbox (220, 300, 480, 140, white)
%parallelput (3)
elsif x > 740 and x < 818 and y > 575 and y < 652 and b = 1 then %Music Play Button
fork musik
elsif x > 836 and x < 913 and y > 575 and y < 652 and b = 1 then % Stops Music
music := true
Music.PlayFileStop
else %stops car
%parallelput (0)
end if
end loop
%Car Ineterface
end if
end loop
|