Refonte pour utiliser le systeme de GUI #112

Merged
kazhnuz merged 102 commits from feat/gui into master 2022-01-06 19:15:16 +01:00
2 changed files with 4 additions and 9 deletions
Showing only changes of commit a6ff9b2ca2 - Show all commits

View file

@ -24,6 +24,10 @@ function RadianceScene:hideOverlay()
self.gui:hideScreen("overlay") self.gui:hideScreen("overlay")
end end
function RadianceScene:showMessage(message)
self.gui.elements["messageQueue"]:addMessage(message)
end
function RadianceScene:showOverlay(darken) function RadianceScene:showOverlay(darken)
self.gui:showScreen("overlay") self.gui:showScreen("overlay")
if (darken) then if (darken) then

View file

@ -60,8 +60,6 @@ function OverWorld:new(area, playerx, playery)
self.tweens:newTween(0, 0.3, {ringBorder=16}, "inOutQuad") self.tweens:newTween(0, 0.3, {ringBorder=16}, "inOutQuad")
self.timeBorder = -10 self.timeBorder = -10
self.messages = MessageQueue(self)
self.isPlaying = "" self.isPlaying = ""
self.events = EventManager(self) self.events = EventManager(self)
@ -93,10 +91,6 @@ function OverWorld:endEvent()
self.canPause = true self.canPause = true
end end
function OverWorld:showMessage(message)
self.messages:addMessage(message)
end
function OverWorld:registerScreen(screen) function OverWorld:registerScreen(screen)
if (self.currentScreen ~= nil) then if (self.currentScreen ~= nil) then
self.currentScreen:quit() self.currentScreen:quit()
@ -108,7 +102,6 @@ function OverWorld:update(dt)
local keys = self:getKeys(1) local keys = self:getKeys(1)
self.tweens:update(dt) self.tweens:update(dt)
self.events:update(dt) self.events:update(dt)
self.messages:update(dt)
if (self.world.isActive) then if (self.world.isActive) then
self.charsetManager:update(dt) self.charsetManager:update(dt)
@ -183,8 +176,6 @@ end
function OverWorld:draw() function OverWorld:draw()
self.events:draw() self.events:draw()
self.messages:draw()
self:drawScreenBottomLayer() self:drawScreenBottomLayer()
end end