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/Menu/DrawMenu.lua

21 lines
817 B

local function title()
2 months ago
local height = love.graphics.getHeight() / _G.Y_SCALE
local width = love.graphics.getWidth() / _G.X_SCALE
love.graphics.setFont(GameFont)
2 months ago
love.graphics.setColor(0.5, 1, 1)
love.graphics.rectangle("fill", 0, 0, width, height)
love.graphics.setColor(0, 0, 0)
love.graphics.print("Tanks-A-Lot", 100, 100)
end
function DrawMenu()
2 months ago
local bwidth, bheight = 300 * _G.X_SCALE, 140 * _G.Y_SCALE
2 months ago
title()
GUI:newButton(100, 200, bwidth, bheight, "Play", MENU_POS == 0 and true or false)
GUI:newButton(100, 350, bwidth, bheight, "???", MENU_POS == 1 and true or false)
GUI:newButton(100, 500, bwidth, bheight, "???", MENU_POS == 2 and true or false)
GUI:newButton(100, 650, bwidth, bheight, "Quit", MENU_POS == 3 and true or false)
2 months ago
love.graphics.setColor(255, 255, 255) -- reset colours
end