/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 21:05:20 UTC
  • Revision ID: josh@9ix.org-20130825210520-2of9iq2uemncp336
overhaul collision and physics to fix an annoying collision resolution 
bug

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