mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 04:06:39 +09:00
Prototype Done with docs
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
@alias Gui
|
||||
]]
|
||||
|
||||
--- Core.
|
||||
-- Functions that act as a landing point for the other funtions
|
||||
-- @section core
|
||||
|
||||
local Event = require 'utils.event' -- @dep utils.event
|
||||
local Prototype = require 'expcore.gui.prototype'
|
||||
|
||||
@@ -25,4 +29,17 @@ function Gui.get_concept(name)
|
||||
return Gui.concepts[name] or error('Gui concept "'..name..'" is not defind',2)
|
||||
end
|
||||
|
||||
function Gui.clone_concept(name,new_name)
|
||||
local concept = Gui.concepts[name] or error('Gui concept "'..name..'" is not defind',2)
|
||||
|
||||
if Gui.concepts[name] then
|
||||
error('Gui concept "'..name..'" is already defind',2)
|
||||
end
|
||||
|
||||
local new_concept = concept:clone(new_name)
|
||||
Gui.concepts[new_name] = new_concept
|
||||
|
||||
return new_concept
|
||||
end
|
||||
|
||||
return Gui
|
||||
Reference in New Issue
Block a user