Button docs

This commit is contained in:
Cooldude2606
2019-08-27 21:08:48 +01:00
parent 32f41ff722
commit cb59cc0537
99 changed files with 982 additions and 138 deletions

View File

@@ -14,6 +14,15 @@ local Gui = {
concepts = {}
}
--[[-- Loads a concept from the concepts file, used internally
@tparam string concept the name of the concept to require
@usage-- Load a base concept
Gui.require_concept('frame')
]]
function Gui.require_concept(concept)
require('expcore.gui.concepts.'..concept)
end
--[[-- Gets the gui concept with this name
@tparam string name the name of the concept that you want to get
@usage-- Getting a gui concept
@@ -64,8 +73,8 @@ local custom_button = Gui.clone_concept('Button','CustomButton')
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)
if Gui.concepts[new_name] then
error('Gui concept "'..new_name..'" is already defind',2)
end
return concept:clone(new_name)