/ld27

To get this branch, use:
bzr branch http://9ix.org/bzr/ld27

« back to all changes in this revision

Viewing changes to win_view.lua

  • Committer: Josh C
  • Date: 2013-08-25 16:32:40 UTC
  • Revision ID: josh@9ix.org-20130825163240-ga1iviz5lgizi8bu
oops, actually check in win view

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
WinView = Subview:extend {
2
2
   onNew = function (self)
3
 
              local boxW = 550
 
3
              local boxW = 300
4
4
              local boxH = 190
5
5
              local boxL = the.app.width / 2 - boxW / 2
6
6
              local boxT = the.app.height / 2 - boxH / 2
7
7
              local boxR = boxL + boxW
8
8
              local boxB = boxT + boxH
9
 
              local nr = 'data/NewRocker-Regular.otf'
10
 
 
11
 
              self.scale = the.app.scale
12
 
              self.realTranslate = the.app.view.realTranslate
13
9
 
14
10
              self:add(Fill:new{
15
11
                          fill = {240,221,58},
28
24
                       })
29
25
 
30
26
              self:add(Text:new{
31
 
                          text = 'You found the shinies!',
 
27
                          text = 'You Win!',
32
28
                          x = boxL,
33
 
                          y = boxT + 25,
 
29
                          y = boxT + 16,
34
30
                          width = boxW,
35
 
                          font = {nr, 48},
 
31
                          font = 48,
36
32
                          align = 'center',
37
33
                          tint = {0,0,0}
38
34
                       })
40
36
              self:add(Text:new{
41
37
                          text = 'Press Q to quit',
42
38
                          x = boxL,
43
 
                          y = boxT + 100,
 
39
                          y = boxT + 90,
44
40
                          width = boxW,
45
 
                          font = {nr, 20},
 
41
                          font = 20,
46
42
                          align = 'center',
47
43
                          tint = {0,0,0}
48
44
                       })
50
46
              self:add(Text:new{
51
47
                          text = 'Any other key to keep exploring',
52
48
                          x = boxL,
53
 
                          y = boxT + 130,
 
49
                          y = boxT + 120,
54
50
                          width = boxW,
55
 
                          font = {nr, 20},
 
51
                          font = 20,
56
52
                          align = 'center',
57
53
                          tint = {0,0,0}
58
54
                       })
73
69
                    self:deactivate()
74
70
                 end
75
71
              end
76
 
}
 
72
}
 
 
b'\\ No newline at end of file'