Fix loading screen

This commit is contained in:
SweetSea-ButImNotSweet
2024-04-21 15:14:15 +07:00
parent 66aae1342d
commit 283e7d8f28
3 changed files with 9 additions and 8 deletions

View File

@@ -2,6 +2,10 @@
bigint = require "libs.bigint.bigint"
number_names = require "libs.bigint.named-powers-of-ten"
-- Fonts
FONT_tromi = love.graphics.newFont('res/fonts/monofonto rg.otf', 28)
FONT_big = love.graphics.newFont('res/fonts/monofonto rg.otf', 56)
-- Graphics
ShowLoadingText('backgrounds')
local gc_newImage, gc_newVideo = love.graphics.newImage, love.graphics.newVideo

View File

@@ -23,10 +23,6 @@ function love.load()
math.randomseed(os.time())
require "settings"
-- Loading font first
FONT_tromi = love.graphics.newFont('res/fonts/monofonto rg.otf', 28)
FONT_big = love.graphics.newFont('res/fonts/monofonto rg.otf', 56)
-- Window stuffs
love.mouse.setVisible(false)
love.window.setMode(love.graphics.getWidth(), love.graphics.getHeight(), {resizable = true});
@@ -38,11 +34,13 @@ function love.load()
-- Text "LOADING..."
local loaded = {}
local prev_thing
local loadedCounter = 0
--- Show the loading text while we are loading resources<br>
--- **WARNING**: should only be used while loading the game!
function ShowLoadingText(thing)
table.insert(loaded, thing)
if prev_thing then table.insert(loaded, prev_thing) end
prev_thing = thing
loadedCounter = loadedCounter + 1
love.graphics.replaceTransform(GLOBAL_TRANSFORM)
@@ -63,7 +61,7 @@ function love.load()
-- Now it's real time to load all stuffs!
highscores = {}
require "load"
require "load" -- Most game's resources are loaded in here
require "scene"
require "game.vctrl" -- VCTRL

View File

@@ -1,6 +1,5 @@
local TrainingScene = SCENE:extend()
TrainingScene.title = "Max Gravity Training"
TrainingScene.title = "20G Training"
require 'settings'