-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.lua
62 lines (31 loc) · 935 Bytes
/
Menu.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Menu = {}
mouse = {}
require ("menuButtons")
function Menu:enter()
print("Starting Menu Enter tasks")
makeMenuButtonClickable()
print ("Finsished Menu Enter Tasks")
end
function Menu:exit()
print ("Starting menu exit tasks")
makeMenuButtonUnclickable()
print ("finishing menu exit tasks")
end
background = love.graphics.newImage("BACKGROUND1080.png")
function Menu:update(dt)
if handleKeyPress("escape") then
print("escape key is down in Menu, aborting program(self destruct)")
love.event.quit()
end
if handleKeyPress("return") then
print ("enter key pressed, entering level one")
changeState(game_Level_one)
end
end
function Menu:draw()
love.graphics.draw(background, 0, 0)
drawButton(Menu_to_settings_BUTTON)
drawButton(Menu_label_BUTTON)
drawButton(Menu_To_Level_One_BUTTON)
love.graphics.setColor(255, 255, 255)
end