Added sliders

This commit is contained in:
Cooldude2606 committed 2019-09-01 17:18:19 +01:00
1 parent 129610679e
commit 71b0e16bd0
101 files changed
+549 -161

No files matched your search

+18
View File
@@ -682,4 +682,22 @@ function Common.table_insert(tbl,start_index,tbl2)
return tbl
end
--[[-- Used to resolve a value that could also be a function returning that value
@tparam any value the value which you want to test is not nil and if it is a function then call the function
@treturn any the value given or returned by value if it is a function
@usage-- Default value handling
-- if default value is not a function then it is returned
-- if it is a function then it is called with the first argument being self
local value = Common.resolve_value(self.defaut_value,self)
]]
function Common.resolve_value(value,...)
if value then
if type(value) == 'function' then
return value(...)
else
return value
end
end
end
return Common