Basalt2 update
- Finished themes - Added state plugins for persistance - Finished reactive plugin - Added debug plugin (80% finished) - Added benchmark plugin - Added Tree, Table, List, Dropdown and Menu Elements - Bugfixes
This commit is contained in:
@@ -13,6 +13,7 @@ local main = format:gsub("path", dir)
|
||||
local ElementManager = {}
|
||||
ElementManager._elements = {}
|
||||
ElementManager._plugins = {}
|
||||
ElementManager._APIs = {}
|
||||
local elementsDirectory = fs.combine(dir, "elements")
|
||||
local pluginsDirectory = fs.combine(dir, "plugins")
|
||||
|
||||
@@ -40,10 +41,14 @@ if fs.exists(pluginsDirectory) then
|
||||
local plugin = require(fs.combine("plugins", name))
|
||||
if type(plugin) == "table" then
|
||||
for k,v in pairs(plugin) do
|
||||
if(ElementManager._plugins[k]==nil)then
|
||||
ElementManager._plugins[k] = {}
|
||||
if(k ~= "API")then
|
||||
if(ElementManager._plugins[k]==nil)then
|
||||
ElementManager._plugins[k] = {}
|
||||
end
|
||||
table.insert(ElementManager._plugins[k], v)
|
||||
else
|
||||
ElementManager._APIs[name] = v
|
||||
end
|
||||
table.insert(ElementManager._plugins[k], v)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -114,4 +119,8 @@ function ElementManager.getElementList()
|
||||
return ElementManager._elements
|
||||
end
|
||||
|
||||
function ElementManager.getAPI(name)
|
||||
return ElementManager._APIs[name]
|
||||
end
|
||||
|
||||
return ElementManager
|
||||
Reference in New Issue
Block a user