/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: 2014-07-03 15:28:23 UTC
  • Revision ID: josh@9ix.org-20140703152823-4241je58pflhx7ec
scaling

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 = 300
 
3
              local boxW = 550
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
9
12
 
10
13
              self:add(Fill:new{
11
14
                          fill = {240,221,58},
24
27
                       })
25
28
 
26
29
              self:add(Text:new{
27
 
                          text = 'You Win!',
 
30
                          text = 'You found the shinies!',
28
31
                          x = boxL,
29
 
                          y = boxT + 16,
 
32
                          y = boxT + 25,
30
33
                          width = boxW,
31
 
                          font = 48,
 
34
                          font = {nr, 48},
32
35
                          align = 'center',
33
36
                          tint = {0,0,0}
34
37
                       })
36
39
              self:add(Text:new{
37
40
                          text = 'Press Q to quit',
38
41
                          x = boxL,
39
 
                          y = boxT + 90,
 
42
                          y = boxT + 100,
40
43
                          width = boxW,
41
 
                          font = 20,
 
44
                          font = {nr, 20},
42
45
                          align = 'center',
43
46
                          tint = {0,0,0}
44
47
                       })
46
49
              self:add(Text:new{
47
50
                          text = 'Any other key to keep exploring',
48
51
                          x = boxL,
49
 
                          y = boxT + 120,
 
52
                          y = boxT + 130,
50
53
                          width = boxW,
51
 
                          font = 20,
 
54
                          font = {nr, 20},
52
55
                          align = 'center',
53
56
                          tint = {0,0,0}
54
57
                       })
69
72
                    self:deactivate()
70
73
                 end
71
74
              end
72
 
}
 
 
b'\\ No newline at end of file'
 
75
}