Refonte pour utiliser le systeme de GUI #112
1 changed files with 4 additions and 3 deletions
|
@ -7,9 +7,8 @@ local TweenManager = require "birb.classes.time"
|
|||
local elementDataStruct = require "birb.structures.elementData"
|
||||
|
||||
|
||||
function GuiScreen:new(name, controller)
|
||||
function GuiScreen:new(name)
|
||||
self:initWrapper()
|
||||
self.controller = controller or self.gui
|
||||
self.name = name
|
||||
self.isVisible = false
|
||||
self.transforms = {}
|
||||
|
@ -17,13 +16,15 @@ function GuiScreen:new(name, controller)
|
|||
|
||||
self:reset()
|
||||
self:registerElements()
|
||||
self.controller:addScreen(name, self)
|
||||
self.gui:addScreen(name, self)
|
||||
end
|
||||
|
||||
function GuiScreen:initWrapper()
|
||||
local scene = core.scenemanager.nextScene or core.scenemanager.currentScene
|
||||
self.scene = scene
|
||||
self.gui = scene.gui
|
||||
-- Présent pour la compatibilité
|
||||
self.controller = self.gui
|
||||
self.assets = scene.assets
|
||||
end
|
||||
|
Loading…
Reference in a new issue