New menu font: Merriweather Italic
This commit is contained in:
parent
a9a91f197d
commit
620a7e461c
Binary file not shown.
21
main.lua
21
main.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue