feat: add a way to pass arbitrary in scene switch

This commit is contained in:
Kazhnuz 2022-01-02 20:17:03 +01:00
parent 47b86c1862
commit d118a998ad
2 changed files with 7 additions and 2 deletions

View file

@ -122,8 +122,9 @@ function Gui:hideScreen(screenname)
end end
function Gui:showScreen(screenname) function Gui:showScreen(screenname, focusElement, widgetId, page, arbitraryDatas)
self.screens[screenname]:show() self.screens[screenname]:show(focusElement, widgetId, page)
self.screens[screenname]:setDatas(arbitraryDatas)
end end
-- SOUND FUNCTIONS -- SOUND FUNCTIONS

View file

@ -65,6 +65,10 @@ function GuiScreen:showSimple(focusElement, widgetId, page)
end end
function GuiScreen:setDatas(datas)
end
function GuiScreen:hide() function GuiScreen:hide()
if (self.isVisible) then if (self.isVisible) then
if (self.transforms["hide"] ~= nil) then if (self.transforms["hide"] ~= nil) then