From 2703371434e3621e181eb904dae13125fa4509e6 Mon Sep 17 00:00:00 2001 From: lustlion Date: Thu, 3 Feb 2022 07:08:15 +0100 Subject: [PATCH] Fixed font now only applies on menus --- data/locale/ENG.lua | 3 ++- data/locale/HEON.lua | 11 ++++------- data/scripts/menu.lua | 3 +++ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/data/locale/ENG.lua b/data/locale/ENG.lua index d5819ee..de5b2c3 100644 --- a/data/locale/ENG.lua +++ b/data/locale/ENG.lua @@ -1,3 +1,5 @@ +LocaleFont = love.graphics.newFont("assets/ui/fonts/heon.ttf",14) + Locale = {} Locale.ui = {} @@ -13,6 +15,5 @@ Locale.character.chaos.name = "Aelato" Locale.character.life = {} Locale.character.life.name = "Olidia" - Locale.dialogue = {} Locale.dialogue.example = {"Hello!","Duh.","Lol"} diff --git a/data/locale/HEON.lua b/data/locale/HEON.lua index 03f647a..91c8a43 100644 --- a/data/locale/HEON.lua +++ b/data/locale/HEON.lua @@ -1,4 +1,4 @@ -love.graphics.setNewFont("assets/ui/fonts/heon.ttf",18) +LocaleFont = love.graphics.newFont("assets/ui/fonts/heon.ttf",18) Locale = {} @@ -6,9 +6,10 @@ Locale.ui = {} Locale.ui.pause_screen_resume = "" Locale.ui.pause_screen_options = "" Locale.ui.pause_screen_exit = "" + Locale.character = {} Locale.character.fairy = {} -Locale.character.fairy.name = "" +Locale.character.fairy.name = "" Locale.character.chaos = {} Locale.character.chaos.name = "" Locale.character.life = {} @@ -16,8 +17,4 @@ Locale.character.life.name = "" Locale.dialogue = {} -Locale.dialogue.example = { - "", - "", - "" -} +Locale.dialogue.example = {"","",""} diff --git a/data/scripts/menu.lua b/data/scripts/menu.lua index a40ac77..f407208 100644 --- a/data/scripts/menu.lua +++ b/data/scripts/menu.lua @@ -1,4 +1,6 @@ function MenuDraw(menu) + local font = love.graphics.getFont() + love.graphics.setFont(LocaleFont) -- Set scale to 1 love.graphics.scale(0.5,0.5) if menu == "pause" then @@ -12,6 +14,7 @@ function MenuDraw(menu) end -- Reset scale love.graphics.scale(2,2) + love.graphics.setFont(font) end function MenuDrawPauseScreen()