tibia-client/modules/core/widget.lua

19 lines
614 B
Lua
Raw Normal View History

2011-08-14 04:09:11 +02:00
function UIWidget:setMargin(...)
local params = {...}
if #params == 1 then
2011-08-20 22:30:41 +02:00
self:setMarginTop(params[1])
self:setMarginRight(params[1])
self:setMarginBottom(params[1])
self:setMarginLeft(params[1])
2011-08-14 04:09:11 +02:00
elseif #params == 2 then
2011-08-20 22:30:41 +02:00
self:setMarginTop(params[1])
self:setMarginRight(params[2])
self:setMarginBottom(params[1])
self:setMarginLeft(params[2])
2011-08-14 04:09:11 +02:00
elseif #params == 4 then
2011-08-20 22:30:41 +02:00
self:setMarginTop(params[1])
self:setMarginRight(params[2])
self:setMarginBottom(params[3])
self:setMarginLeft(params[4])
2011-08-14 04:09:11 +02:00
end
end