2012-06-26 00:13:30 +02:00
|
|
|
-- @docclass UIWidget
|
|
|
|
|
2011-08-14 04:09:11 +02:00
|
|
|
function UIWidget:setMargin(...)
|
2012-01-10 23:13:40 +01:00
|
|
|
local params = {...}
|
|
|
|
if #params == 1 then
|
|
|
|
self:setMarginTop(params[1])
|
|
|
|
self:setMarginRight(params[1])
|
|
|
|
self:setMarginBottom(params[1])
|
|
|
|
self:setMarginLeft(params[1])
|
|
|
|
elseif #params == 2 then
|
|
|
|
self:setMarginTop(params[1])
|
|
|
|
self:setMarginRight(params[2])
|
|
|
|
self:setMarginBottom(params[1])
|
|
|
|
self:setMarginLeft(params[2])
|
|
|
|
elseif #params == 4 then
|
|
|
|
self:setMarginTop(params[1])
|
|
|
|
self:setMarginRight(params[2])
|
|
|
|
self:setMarginBottom(params[3])
|
|
|
|
self:setMarginLeft(params[4])
|
|
|
|
end
|
2011-12-07 01:31:55 +01:00
|
|
|
end
|