/ld27

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

« back to all changes in this revision

Viewing changes to pause_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:
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
 
                          fill = {0,0,0},
 
15
                          fill = {240,221,58},
12
16
                          x = boxL - 16,
13
17
                          y = boxT - 16,
14
18
                          width = boxW + 32,
16
20
                       })
17
21
 
18
22
              self:add(Fill:new{
19
 
                          fill = {255,255,255},
 
23
                          fill = {166,44,217},
20
24
                          x = boxL,
21
25
                          y = boxT,
22
26
                          width = boxW,
28
32
                          x = boxL,
29
33
                          y = boxT + 16,
30
34
                          width = boxW,
31
 
                          font = 24,
 
35
                          font = {nr, 24},
32
36
                          align = 'center',
33
37
                          tint = {0,0,0}
34
38
                       })
38
42
                          x = boxL,
39
43
                          y = boxT + 48,
40
44
                          width = boxW,
41
 
                          font = 24,
 
45
                          font = {nr, 24},
42
46
                          align = 'center',
43
47
                          tint = {0,0,0}
44
48
                       })
47
51
           end,
48
52
   onUpdate = function (self)
49
53
                 if the.keys:justPressed('escape', 'n') then
 
54
                   if love.system.getOS() == 'Android' then
 
55
                     the.app:quit()
 
56
                   else
50
57
                    self:deactivate()
 
58
                   end
51
59
                 elseif the.keys:justPressed('q', 'y') then
52
60
                    if the.profiler then
53
61
                       the.profiler:stop()
59
67
                    the.app:quit()
60
68
                 end
61
69
              end
62
 
}
 
 
b'\\ No newline at end of file'
 
70
}