-- gui.lua local P = {} if _REQUIREDNAME == nil then gui = P else _G[_REQUIREDNAME] = P end P.overlay = nil -- constructor of the GUI function P:new (gui, fname) local newElement = { window = gui, filename = fname, visible = false } or {} setmetatable(newElement, self) -- connects new element with class self.__index = self return newElement end -- hide function for the GUI function P:hide () self.window:hide() self.visible = false end -- show function for the GUI function P:show () self.window:show() self.visible = true end function P:load () return self:new(winMgr:loadWindowLayout(self.layoutString), self.filename) end return gui or _G[_REQUIREDNAME]