/ld27

To get this branch, use:
bzr branch http://9ix.org/bzr/ld27
24 by Josh C
oops, actually check in win view
1
WinView = Subview:extend {
2
   onNew = function (self)
28 by Josh C
update pause and win screens with ridiculous font
3
              local boxW = 550
24 by Josh C
oops, actually check in win view
4
              local boxH = 190
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'
24 by Josh C
oops, actually check in win view
10
11
              self:add(Fill:new{
12
                          fill = {240,221,58},
13
                          x = boxL - 16,
14
                          y = boxT - 16,
15
                          width = boxW + 32,
16
                          height = boxH + 32,
17
                       })
18
19
              self:add(Fill:new{
20
                          fill = {166,44,217},
21
                          x = boxL,
22
                          y = boxT,
23
                          width = boxW,
24
                          height = boxH,
25
                       })
26
27
              self:add(Text:new{
28 by Josh C
update pause and win screens with ridiculous font
28
                          text = 'You found the shinies!',
24 by Josh C
oops, actually check in win view
29
                          x = boxL,
28 by Josh C
update pause and win screens with ridiculous font
30
                          y = boxT + 25,
24 by Josh C
oops, actually check in win view
31
                          width = boxW,
28 by Josh C
update pause and win screens with ridiculous font
32
                          font = {nr, 48},
24 by Josh C
oops, actually check in win view
33
                          align = 'center',
34
                          tint = {0,0,0}
35
                       })
36
37
              self:add(Text:new{
38
                          text = 'Press Q to quit',
39
                          x = boxL,
28 by Josh C
update pause and win screens with ridiculous font
40
                          y = boxT + 100,
24 by Josh C
oops, actually check in win view
41
                          width = boxW,
28 by Josh C
update pause and win screens with ridiculous font
42
                          font = {nr, 20},
24 by Josh C
oops, actually check in win view
43
                          align = 'center',
44
                          tint = {0,0,0}
45
                       })
46
47
              self:add(Text:new{
48
                          text = 'Any other key to keep exploring',
49
                          x = boxL,
28 by Josh C
update pause and win screens with ridiculous font
50
                          y = boxT + 130,
24 by Josh C
oops, actually check in win view
51
                          width = boxW,
28 by Josh C
update pause and win screens with ridiculous font
52
                          font = {nr, 20},
24 by Josh C
oops, actually check in win view
53
                          align = 'center',
54
                          tint = {0,0,0}
55
                       })
56
57
58
           end,
59
   onUpdate = function (self)
60
                 if the.keys:justPressed('q') then
61
                    if the.profiler then
62
                       the.profiler:stop()
63
                       local outfile = io.open( "profile.txt", "w+" )
64
                       the.profiler:report( outfile )
65
                       outfile:close()
66
                    end
67
68
                    the.app:quit()
69
                 elseif the.keys:allJustPressed() then
70
                    self:deactivate()
71
                 end
72
              end
73
}