sonic-radiance/sonic-radiance.love/game/scenes/init.lua

39 lines
No EOL
1.1 KiB
Lua

local BirbScene = require "birb.modules.scenes"
local RadianceScene = BirbScene:extend()
local Overlay = require "game.modules.gui.overlay"
local MessageQueue = require "game.modules.messagequeue"
function RadianceScene:new(haveBorder, showVersion)
RadianceScene.super.new(self)
-- Importation Global des assets
self.assets:batchImport("assets.commons")
self.assets.fonts["small"]:setLineHeight(16/18)
self.assets.fonts["small"]:setFilter("shadow")
self.gui:addSFX("select", "mSelect")
self.gui:addSFX("navigate", "mBeep")
self.gui:addSFX("back", "mBack")
self.gui:addSFX("error", "mError")
Overlay(haveBorder, showVersion)
MessageQueue(self)
end
function RadianceScene:hideOverlay()
self.gui:hideScreen("overlay")
end
function RadianceScene:showMessage(message)
self.gui.elements["messageQueue"]:addMessage(message)
end
function RadianceScene:showOverlay(darken)
self.gui:showScreen("overlay")
if (darken) then
self.gui:playScreenTransform("overlay", "showBackground")
end
end
return RadianceScene