New menu font: Merriweather Italic

This commit is contained in:
Lovetocode999 2021-03-25 21:27:51 -06:00
parent a9a91f197d
commit 620a7e461c
2 changed files with 11 additions and 10 deletions

Binary file not shown.

View File

@ -353,6 +353,12 @@ function love.load()
-- Ball
ball.img = love.graphics.newImage( "assets/graphics/ball.png" )
-- Font
merriweatherTitle = love.graphics.newFont( "assets/fonts/merriweather.italic.ttf", 40 )
merriweatherSelected = love.graphics.newFont( "assets/fonts/merriweather.italic.ttf", 35 )
merriweatherUnselected = love.graphics.newFont( "assets/fonts/merriweather.italic.ttf", 30 )
merriweatherSmall = love.graphics.newFont( "assets/fonts/merriweather.italic.ttf", 25 )
-- Load settings
if love.filesystem.getInfo( "settings.lua" ) ~= nil then
local settings = love.filesystem.read( "settings.lua" )
@ -1157,18 +1163,15 @@ function love.draw( dt )
if currentMenu ~= nil then
menuList[currentMenu].drawCode()
local menuFont = love.graphics.newFont( 40 )
love.graphics.setFont( menuFont )
love.graphics.setFont( merriweatherTitle )
love.graphics.printf( menuList[currentMenu].title, 10, 160, love.graphics:getWidth() - 20, "center" )
for i, menuItem in ipairs(menuList[currentMenu]) do
if i > menuScroll and i < 5 + menuScroll then
if menuSelect == i then
menuFont = love.graphics.newFont( 35 )
love.graphics.setFont( menuFont )
love.graphics.setFont( merriweatherSelected )
love.graphics.setColor( 1, 1, 1 )
else
menuFont = love.graphics.newFont( 30 )
love.graphics.setFont( menuFont )
love.graphics.setFont( merriweatherUnselected )
love.graphics.setColor( 0.5, 0.5, 0.5 )
end
local itemText = menuItem[1]
@ -1180,8 +1183,7 @@ function love.draw( dt )
end
love.graphics.printf( "> " .. itemText, 10, 160 + ( i * 80 ) - ( menuScroll * 80 ), love.graphics:getWidth() - 20, "center" )
elseif i == menuScroll then
menuFont = love.graphics.newFont( 25 )
love.graphics.setFont( menuFont )
love.graphics.setFont( merriweatherSmall )
love.graphics.setColor( 0.5, 0.5, 0.5 )
local itemText = menuItem[1]
for j, f in ipairs( menuItem ) do
@ -1192,8 +1194,7 @@ function love.draw( dt )
end
love.graphics.printf( ". . .", 10, 200, love.graphics:getWidth() - 20, "center" )
elseif i == 5 + menuScroll then
menuFont = love.graphics.newFont( 25 )
love.graphics.setFont( menuFont )
love.graphics.setFont( merriweatherSmall )
love.graphics.setColor( 0.5, 0.5, 0.5 )
local itemText = menuItem[1]
for j, f in ipairs( menuItem ) do