Hitting your window manager's iconify button hides the screen, but that is not much use if the Klingons can still be heard firing nonstop on the earphones that you are forced to take off. Attempting two actions is futile. Your boss key must do everything.
I do this:
Code: Select all
function love.keypressed(key)
if key=='q' then love.audio.setVolume(0); love.graphics.setMode(1,1) end
if key=='r' then love.audio.setVolume(1); love.graphics.setMode(800,600) end
end
But surely this is a solved problem? Many existing games must have the feature?