/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-05 00:05:23 UTC
  • Revision ID: josh@9ix.org-20140705000523-qxhxpi5ixst875zb
control by touch ("mouse")

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