sonic-radiance/sonic-radiance.love/birb/modules/gui/mixins/screens.lua

20 lines
378 B
Lua
Raw Normal View History

2021-08-21 12:45:49 +02:00
local ScreenList = Object:extend()
function ScreenList:initScreens()
self.screens = {}
end
function ScreenList:addScreen(name, screen)
self.screens[name] = screen
end
function ScreenList:deleteScreen(name)
self.screens[name]:purgeElements()
self.screens[name] = nil
end
function ScreenList:getScreen(name)
return self.screens[name]
end
2021-08-21 12:45:49 +02:00
return ScreenList