PauseView = Subview:extend { onNew = function (self) local boxW = 200 local boxH = 90 local boxL = the.app.width / 2 - boxW / 2 local boxT = the.app.height / 2 - boxH / 2 local boxR = boxL + boxW local boxB = boxT + boxH local nr = 'data/NewRocker-Regular.otf' self.scale = the.app.scale self.realTranslate = the.app.view.realTranslate self:add(Fill:new{ fill = {240,221,58}, x = boxL - 16, y = boxT - 16, width = boxW + 32, height = boxH + 32, }) self:add(Fill:new{ fill = {166,44,217}, x = boxL, y = boxT, width = boxW, height = boxH, }) self:add(Text:new{ text = 'Quit?', x = boxL, y = boxT + 16, width = boxW, font = {nr, 24}, align = 'center', tint = {0,0,0} }) self:add(Text:new{ text = 'Y/N', x = boxL, y = boxT + 48, width = boxW, font = {nr, 24}, align = 'center', tint = {0,0,0} }) end, onUpdate = function (self) if the.keys:justPressed('escape', 'n') then if love.system.getOS() == 'Android' then the.app:quit() else self:deactivate() end elseif the.keys:justPressed('q', 'y') then if the.profiler then the.profiler:stop() local outfile = io.open( "profile.txt", "w+" ) the.profiler:report( outfile ) outfile:close() end the.app:quit() end end }