Slight tweaks

main
mat ess 2022-09-11 14:39:25 -04:00
parent 535a45dbcc
commit 96249df669
2 changed files with 3 additions and 2 deletions

View File

@ -56,7 +56,7 @@ local function initScreen()
end end
local function initFont() local function initFont()
FONT = love.graphics.newFont(24) FONT = love.graphics.newFont(16)
love.graphics.setFont(FONT) love.graphics.setFont(FONT)
FPS_WIDTH = FONT:getWidth("120 FPS") FPS_WIDTH = FONT:getWidth("120 FPS")
FPS_HEIGHT = FONT:getHeight() FPS_HEIGHT = FONT:getHeight()
@ -177,7 +177,7 @@ local function paintFPS()
love.graphics.setBlendMode("alpha") love.graphics.setBlendMode("alpha")
local fps = tostring(love.timer.getFPS()) .. " FPS" local fps = tostring(love.timer.getFPS()) .. " FPS"
love.graphics.setColor(COLORS[1].rgba) love.graphics.setColor(COLORS[1].rgba)
love.graphics.rectangle("fill", WIDTH - FPS_WIDTH - 10, HEIGHT - FPS_HEIGHT - 20, FPS_WIDTH + 10, FPS_HEIGHT + 10) love.graphics.rectangle("fill", WIDTH - FPS_WIDTH - 10, HEIGHT - FPS_HEIGHT - 20, FPS_WIDTH + 30, FPS_HEIGHT + 10, 5, 5)
love.graphics.setColor(COLORS[#COLORS].rgba) love.graphics.setColor(COLORS[#COLORS].rgba)
love.graphics.print(fps, WIDTH - FPS_WIDTH - 5, HEIGHT - FPS_HEIGHT - 15) love.graphics.print(fps, WIDTH - FPS_WIDTH - 5, HEIGHT - FPS_HEIGHT - 15)
end end

View File

@ -1,4 +1,5 @@
-- based on -- based on
-- https://colorbrewer2.org
-- https://github.com/axismaps/colorbrewer/blob/master/colorbrewer_schemes.js -- https://github.com/axismaps/colorbrewer/blob/master/colorbrewer_schemes.js
local colorbrewer = {} local colorbrewer = {}