2021-08-21 17:00:42 +02:00
|
|
|
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-09-18 21:27:14 +02:00
|
|
|
local ActionPrompt = require "game.modules.gui.actionPrompt"
|
2021-08-26 23:27:21 +02:00
|
|
|
|
|
|
|
function RadianceScene:new(haveBorder, showVersion)
|
2021-08-21 17:00:42 +02:00
|
|
|
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")
|
2021-08-30 23:52:45 +02:00
|
|
|
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-09-18 21:27:14 +02:00
|
|
|
ActionPrompt()
|
2021-08-26 23:27:21 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function RadianceScene:hideOverlay()
|
|
|
|
self.gui:hideScreen("overlay")
|
2021-08-21 17:00:42 +02:00
|
|
|
end
|
|
|
|
|
2021-09-16 21:18:57 +02:00
|
|
|
function RadianceScene:showMessage(message)
|
|
|
|
self.gui.elements["messageQueue"]:addMessage(message)
|
|
|
|
end
|
|
|
|
|
2021-09-18 21:27:14 +02:00
|
|
|
function RadianceScene:setPrompt(message)
|
|
|
|
self.gui.elements["actionPrompt"]:setText(message)
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2021-08-21 17:00:42 +02:00
|
|
|
return RadianceScene
|