From d39127dea2cde658e84169be8b7ae52ee4ba6296 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 25 Oct 2021 15:54:21 +0200 Subject: [PATCH] Fonts refactor --- src/app.rb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/app.rb b/src/app.rb index 9aa534c..f1aa8ef 100755 --- a/src/app.rb +++ b/src/app.rb @@ -25,18 +25,13 @@ class Window < Gosu::Window @ui = [] @mainmenu = nil - @font = Gosu::Font.new(self, MAIN_FONT, 18) - @font2 = Gosu::Font.new(self, MAIN_FONT, 20) - @font_title = Gosu::Font.new(self, MAIN_FONT, 64) - @font_button = Gosu::Font.new(self, MAIN_FONT, 48) @fonts = { - normal: @font, - big: @font2, - title: @font_title, - button: @font_button + normal: Gosu::Font.new(self, MAIN_FONT, 18) + big: Gosu::Font.new(self, MAIN_FONT, 20) + title: Gosu::Font.new(self, MAIN_FONT, 64) + button: Gosu::Font.new(self, MAIN_FONT, 48) } - end def start_game