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

35 lines
972 B
Lua
Raw Normal View History

local BirbScene = require "birb.modules.scenes"
local RadianceScene = BirbScene:extend()
2021-08-26 23:27:21 +02:00
local Overlay = require "game.modules.gui.overlay"
2021-08-31 19:13:17 +02:00
local MessageQueue = require "game.modules.messagequeue"
2021-08-26 23:27:21 +02:00
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")
2021-08-26 23:27:21 +02:00
Overlay(haveBorder, showVersion)
2021-08-31 19:13:17 +02:00
MessageQueue(self)
2021-08-26 23:27:21 +02:00
end
function RadianceScene:hideOverlay()
self.gui:hideScreen("overlay")
end
2021-08-31 19:13:17 +02:00
function RadianceScene:showOverlay(darken)
2021-08-26 23:27:21 +02:00
self.gui:showScreen("overlay")
2021-08-31 19:13:17 +02:00
if (darken) then
self.gui:playScreenTransform("overlay", "showBackground")
end
2021-08-26 23:27:21 +02:00
end
return RadianceScene