Refonte pour utiliser le systeme de GUI #112
2 changed files with 13 additions and 8 deletions
|
@ -21,15 +21,15 @@ local animateDisappear = {
|
|||
{"upBorder", "movement", 0.0, 0.5, 0, 0, "inOutQuart"},
|
||||
{"downBorder", "movement", 0.0, 0.5, 424, 240, "inOutQuart"},
|
||||
{"version", "movement", 0.0, 0.5, 380, 250, "inOutQuart"},
|
||||
{"overlayDarken", "tween", 0.0, 0.4, {opacity = 0}, "outExpo"}
|
||||
{"overlayDarken", "tween", 0.0, 0.6, {opacity = 0}, "outExpo"}
|
||||
}
|
||||
|
||||
local showBackground = {
|
||||
{"overlayDarken", "tween", 0.0, 0.4, {opacity = OVERLAY_OPACITY}, "inExpo"}
|
||||
{"overlayDarken", "tween", 0.0, 0.6, {opacity = OVERLAY_OPACITY}, "inExpo"}
|
||||
}
|
||||
|
||||
local hideBackground = {
|
||||
{"overlayDarken", "tween", 0.0, 0.4, {opacity = 0}, "outExpo"}
|
||||
{"overlayDarken", "tween", 0.0, 0.6, {opacity = 0}, "outExpo"}
|
||||
}
|
||||
|
||||
local showVersion = {
|
||||
|
@ -86,10 +86,10 @@ function OverlayScreen:createElements()
|
|||
local d = either(wasActive, 30, 0)
|
||||
local v = either(hadVersion, 30, 0)
|
||||
return {
|
||||
{TextureElement("upBorder", self.borders, 0, d, 0, 1, -1, 0, 0, 1, -1), 0},
|
||||
{TextureElement("downBorder", self.borders, 424, 240 - d, 0, -1, 1, 0, 0, 1, -1), 0},
|
||||
{ColorElement("overlayDarken", 0, 0, 0, 0), 0},
|
||||
{TextElement("version", "small", "v" .. game.version, 380, 250 - v, "left", -1), 0}
|
||||
{TextureElement("upBorder", self.borders, 0, d, 0, 1, -1, 0, 0, 1), 0, -1},
|
||||
{TextureElement("downBorder", self.borders, 424, 240 - d, 0, -1, 1, 0, 0, 1), 0, -1},
|
||||
{ColorElement("overlayDarken", 0, 0, 0, 0), 0, 5},
|
||||
{TextElement("version", "small", "v" .. game.version, 380, 250 - v, "left"), 0, -1}
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ 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)
|
||||
|
@ -16,14 +17,18 @@ function RadianceScene:new(haveBorder, showVersion)
|
|||
self.gui:addSFX("error", "mError")
|
||||
|
||||
Overlay(haveBorder, showVersion)
|
||||
MessageQueue(self)
|
||||
end
|
||||
|
||||
function RadianceScene:hideOverlay()
|
||||
self.gui:hideScreen("overlay")
|
||||
end
|
||||
|
||||
function RadianceScene:showOverlay()
|
||||
function RadianceScene:showOverlay(darken)
|
||||
self.gui:showScreen("overlay")
|
||||
if (darken) then
|
||||
self.gui:playScreenTransform("overlay", "showBackground")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue