/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
38 by Josh C
scaling
11
              self.scale = the.app.scale
12
20 by Josh C
pause/quit screen
13
              self:add(Fill:new{
22 by Josh C
win screen (no trigger)
14
                          fill = {240,221,58},
20 by Josh C
pause/quit screen
15
                          x = boxL - 16,
16
                          y = boxT - 16,
17
                          width = boxW + 32,
18
                          height = boxH + 32,
19
                       })
20
21
              self:add(Fill:new{
22 by Josh C
win screen (no trigger)
22
                          fill = {166,44,217},
20 by Josh C
pause/quit screen
23
                          x = boxL,
24
                          y = boxT,
25
                          width = boxW,
26
                          height = boxH,
27
                       })
28
29
              self:add(Text:new{
30
                          text = 'Quit?',
31
                          x = boxL,
32
                          y = boxT + 16,
33
                          width = boxW,
28 by Josh C
update pause and win screens with ridiculous font
34
                          font = {nr, 24},
20 by Josh C
pause/quit screen
35
                          align = 'center',
36
                          tint = {0,0,0}
37
                       })
38
39
              self:add(Text:new{
40
                          text = 'Y/N',
41
                          x = boxL,
42
                          y = boxT + 48,
43
                          width = boxW,
28 by Josh C
update pause and win screens with ridiculous font
44
                          font = {nr, 24},
20 by Josh C
pause/quit screen
45
                          align = 'center',
46
                          tint = {0,0,0}
47
                       })
48
49
50
           end,
51
   onUpdate = function (self)
52
                 if the.keys:justPressed('escape', 'n') then
53
                    self:deactivate()
54
                 elseif the.keys:justPressed('q', 'y') then
55
                    if the.profiler then
56
                       the.profiler:stop()
57
                       local outfile = io.open( "profile.txt", "w+" )
58
                       the.profiler:report( outfile )
59
                       outfile:close()
60
                    end
61
62
                    the.app:quit()
63
                 end
64
              end
38 by Josh C
scaling
65
}