You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
love2d-tank/Pause/DrawPause.lua

21 lines
851 B

function DrawPause()
local opacity = 0.3
local height = love.graphics.getHeight() / _G.Y_SCALE
local width = love.graphics.getWidth() / _G.X_SCALE
local bwidth, bheight = 300 * _G.X_SCALE, 140 * _G.Y_SCALE
love.graphics.setFont(GameFont)
DrawGame() --Draw a single frame of the game
love.graphics.setColor(0.1, 0.1, 0.1, opacity) --overlay opaque img
love.graphics.rectangle("fill", 0, 0, width, height)
love.graphics.setColor(1, 1, 1)
love.graphics.print("PAUSED", 100, 100)
--love.graphics.print("" .. PAUSE_POS, 200,200)
GUI:newButton(100, 200, bwidth, bheight, "Back", PAUSE_POS == 0 and true or false)
GUI:newButton(100, 350, bwidth, bheight, "Menu", PAUSE_POS == 1 and true or false)
GUI:newButton(100, 500, bwidth, bheight, "Quit", PAUSE_POS == 2 and true or false)
love.graphics.setColor(255, 255, 255) -- reset colours
end