/ld27

To get this branch, use:
bzr branch http://9ix.org/bzr/ld27
20 by Josh C
pause/quit screen
1
PauseView = Subview:extend {
2
   onNew = function (self)
3
              local boxW = 200
4
              local boxH = 90
5
              local boxL = the.app.width / 2 - boxW / 2
6
              local boxT = the.app.height / 2 - boxH / 2
7
              local boxR = boxL + boxW
8
              local boxB = boxT + boxH
28 by Josh C
update pause and win screens with ridiculous font
9
              local nr = 'data/NewRocker-Regular.otf'
20 by Josh C
pause/quit screen
10
11
              self:add(Fill:new{
22 by Josh C
win screen (no trigger)
12
                          fill = {240,221,58},
20 by Josh C
pause/quit screen
13
                          x = boxL - 16,
14
                          y = boxT - 16,
15
                          width = boxW + 32,
16
                          height = boxH + 32,
17
                       })
18
19
              self:add(Fill:new{
22 by Josh C
win screen (no trigger)
20
                          fill = {166,44,217},
20 by Josh C
pause/quit screen
21
                          x = boxL,
22
                          y = boxT,
23
                          width = boxW,
24
                          height = boxH,
25
                       })
26
27
              self:add(Text:new{
28
                          text = 'Quit?',
29
                          x = boxL,
30
                          y = boxT + 16,
31
                          width = boxW,
28 by Josh C
update pause and win screens with ridiculous font
32
                          font = {nr, 24},
20 by Josh C
pause/quit screen
33
                          align = 'center',
34
                          tint = {0,0,0}
35
                       })
36
37
              self:add(Text:new{
38
                          text = 'Y/N',
39
                          x = boxL,
40
                          y = boxT + 48,
41
                          width = boxW,
28 by Josh C
update pause and win screens with ridiculous font
42
                          font = {nr, 24},
20 by Josh C
pause/quit screen
43
                          align = 'center',
44
                          tint = {0,0,0}
45
                       })
46
47
48
           end,
49
   onUpdate = function (self)
50
                 if the.keys:justPressed('escape', 'n') then
51
                    self:deactivate()
52
                 elseif the.keys:justPressed('q', 'y') then
53
                    if the.profiler then
54
                       the.profiler:stop()
55
                       local outfile = io.open( "profile.txt", "w+" )
56
                       the.profiler:report( outfile )
57
                       outfile:close()
58
                    end
59
60
                    the.app:quit()
61
                 end
62
              end
63
}