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
|
function drawPanelButton(id)
love.graphics.setColor(150, 150, 150)
if panel.b[id] ~= 0 then
if layer[1] == panel.b[id] and win[panel.b[id]].min == false then
drawDownBox(panel.s.x+72+(137*id-137), panel.s.y, panel.s.width*2, panel.s.height, 2)
else
drawUpBox(panel.s.x+72+(137*id-137), panel.s.y, panel.s.width*2, panel.s.height, 2)
end
love.graphics.setColor(70,70,70)
love.graphics.print(win[panel.b[id]].title, panel.s.x+4+77+(137*id-137), panel.s.y+7)
if (sys.mouse.p.p == true and sys.mouse.p.x >= panel.s.x+72+(137*id-137)
and sys.mouse.p.x <= (panel.s.x+72+(137*id-137))+(panel.s.width*2)
and sys.mouse.p.y >= panel.s.y and sys.mouse.p.y <= panel.s.y+panel.s.height) then
if win[panel.b[id]].min == false then
layer.sentToFront = panel.b[id]
elseif win[panel.b[id]].min == true then
win[panel.b[id]].min = false
win[panel.b[id]].oldlayer = win[panel.b[id]].layer
win[panel.b[id]].layer = 1
end
end
end
end
function drawStart()
panel.width = love.graphics.getWidth( )
panel.y = love.graphics.getHeight()
panel.y = panel.y - panel.thick
panel.s.y = panel.y + 5
love.graphics.setColor(192, 192, 192)
love.graphics.rectangle("fill", panel.x, panel.y, panel.width, panel.height)
love.graphics.setColor(220, 220, 220)
love.graphics.setLineWidth(2)
love.graphics.line(panel.x, panel.y, panel.width, panel.y)
love.graphics.setColor(150, 150, 150)
if start.o == true then
drawDownBox(panel.s.x, panel.s.y, panel.s.width, panel.s.height, 2)
else
drawUpBox(panel.s.x, panel.s.y, panel.s.width, panel.s.height, 2)
end
love.graphics.setColor(70,70,70)
love.graphics.print("START", panel.s.x+4, panel.s.y+7)
drawPanelButton(1)
drawPanelButton(2)
drawPanelButton(3)
drawPanelButton(4)
drawPanelButton(5)
drawPanelButton(6)
end
|