mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Removed sytax errors
This commit is contained in:
@@ -14,9 +14,10 @@ function center.add(obj)
|
|||||||
if not is_type(obj,'table') then return end
|
if not is_type(obj,'table') then return end
|
||||||
if not is_type(obj.name,'string') then return end
|
if not is_type(obj.name,'string') then return end
|
||||||
setmetatable(obj,{__index=center._center})
|
setmetatable(obj,{__index=center._center})
|
||||||
self.tabs = {}
|
obj.tabs = {}
|
||||||
|
obj._tabs = {}
|
||||||
Gui._add_data('center',obj.name,obj)
|
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
|
return obj
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -82,7 +83,7 @@ end
|
|||||||
|
|
||||||
function center._center:add_tab(name,caption,tooltip,callback)
|
function center._center:add_tab(name,caption,tooltip,callback)
|
||||||
self._tabs[self.name..'_'..name] = callback
|
self._tabs[self.name..'_'..name] = callback
|
||||||
self.tabs[name] = Gui.inputs.inputs.add{
|
self.tabs[name] = Gui.inputs.add{
|
||||||
type='button',
|
type='button',
|
||||||
name=self.name..'_'..name,
|
name=self.name..'_'..name,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
|
|||||||
13
control.lua
13
control.lua
@@ -41,4 +41,15 @@ require('/ExpCore/ranks')
|
|||||||
-- this loads any edits that are not need in core pcall as file may not be preset
|
-- this loads any edits that are not need in core pcall as file may not be preset
|
||||||
pcall(require,'/Addons/playerRanks')
|
pcall(require,'/Addons/playerRanks')
|
||||||
-- this makes sure that all the little details are cleaned up
|
-- 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)
|
||||||
Reference in New Issue
Block a user