Removed sytax errors

This commit is contained in:
Cooldude2606
2017-12-19 18:45:45 +00:00
parent b6971986b0
commit d7b8c47455
2 changed files with 16 additions and 4 deletions

View File

@@ -14,9 +14,10 @@ function center.add(obj)
if not is_type(obj,'table') then return end
if not is_type(obj.name,'string') then return end
setmetatable(obj,{__index=center._center})
self.tabs = {}
obj.tabs = {}
obj._tabs = {}
Gui._add_data('center',obj.name,obj)
toolbar.add(obj.name,obj.caption,obj.tooltip,obj.open)
Gui.toolbar.add(obj.name,obj.caption,obj.tooltip,obj.open)
return obj
end
@@ -82,7 +83,7 @@ end
function center._center:add_tab(name,caption,tooltip,callback)
self._tabs[self.name..'_'..name] = callback
self.tabs[name] = Gui.inputs.inputs.add{
self.tabs[name] = Gui.inputs.add{
type='button',
name=self.name..'_'..name,
caption=caption,

View File

@@ -41,4 +41,15 @@ require('/ExpCore/ranks')
-- this loads any edits that are not need in core pcall as file may not be preset
pcall(require,'/Addons/playerRanks')
-- this makes sure that all the little details are cleaned up
Ranking._auto_edit_ranks()
Ranking._auto_edit_ranks()
-- testing the center gui
center.add{
name='test-center',
caption='Gui Center',
tooltip='Just a gui test'
}:add_tab('tab-1','Tab 1','Just a tab',function(frame)
frame.add{type='lable',caption='Test'}
end):add_tab('tab-2','Tab 2','Just a tab',function(frame)
frame.add{type='lable',caption='Test 2'}
end)