Prep for more allow on the guis

This commit is contained in:
Cooldude2606
2017-09-14 21:15:18 +01:00
parent 2bbc5d1051
commit e8fd6105ec
4 changed files with 13 additions and 24 deletions

View File

@@ -24,12 +24,12 @@ local draw_frame = ExpGui.draw_frame
--left GUIs are always present and only have their visibility toggled
--Add a frame to the left bar; event(player,frame) must be present for left GUIs as there is no default
--vis should be true or false based on the player join game state of the GUI
function add_frame.left(name,default_display,default_tooltip,restriction,vis,event)
function add_frame.left(name,default_display,default_tooltip,vis,event)
if not name then error('Frame requires a name') end
if not event or type(event) ~= 'function' then error('Frame requires a draw function') end
local vis = vis or false
table.insert(frames.left,{name=name,display=default_display,event=event,vis=vis})
ExpGui.toolbar.add_button(name,default_display,default_tooltip,restriction,draw_frame.left)
ExpGui.toolbar.add_button(name,default_display,default_tooltip,draw_frame.left)
end
--draw the left GUI for the player; called via script, only call manually when update is true and element is the name of the GUI
function draw_frame.left(player,element,update)