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
function Gui:showScreen(screenname)
self.screens[screenname]:show()
function Gui:showScreen(screenname, focusElement, widgetId, page, arbitraryDatas)
self.screens[screenname]:show(focusElement, widgetId, page)
self.screens[screenname]:setDatas(arbitraryDatas)
end
-- SOUND FUNCTIONS

View file

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