/spacey

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-06-08 01:10:00 UTC
  • Revision ID: josh@9ix.org-20130608011000-18c5io3gp1gzwebk
toggle fullscreen with f11 or alt-enter

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
 
261
261
              self.view = GameView:new()
262
262
 
263
 
              -- try going fullscreen.  should fail silently if it
264
 
              -- can't go to fullscreen.
 
263
              -- should fail silently if it can't go to fullscreen...
265
264
              love.graphics.toggleFullscreen()
266
265
 
267
266
              if DEBUG then
283
282
                 if the.keys:justPressed('q') then
284
283
                    self.quit()
285
284
                 elseif the.keys:justPressed('return') then
286
 
                    self.view = GameView:new()
 
285
                    if the.keys:pressed('alt') then
 
286
                       love.graphics.toggleFullscreen()
 
287
                    else
 
288
                       self.view = GameView:new()
 
289
                    end
287
290
                 elseif the.keys:justPressed('f1') then
288
291
                    local ss = love.graphics.newScreenshot()
289
292
                    ss:encode('screenshot-' ..love.timer.getTime()..'.png')
 
293
                 elseif the.keys:justPressed('f11') then
 
294
                    love.graphics.toggleFullscreen()
290
295
                 end
291
296
              end,
292
297
   update = function (self, dt)