mirror of
https://github.com/edubart/otclient.git
synced 2025-04-30 01:29:21 +02:00

* rework client modules * hide main window when loading * remake top menu functions * rework modules autoload * improve path resolving for otml and lua * move core_widgets to core_lib * fix tooltip issues * split some styles * add bit32 lua library * fix assert issues * fix compilation on linux 32 systems * rework gcc compile options * renable and fix some warnings * remove unused constants * speedup sprite cache * move UIGame to lua (not funcional yet) * fix a lot of issues in x11 window * fix crash handler * add some warnings do uiwidget and much more...
20 lines
557 B
Lua
20 lines
557 B
Lua
function UIWidget:setMargin(...)
|
|
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
|
|
end
|