mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
Moveable Tabbars, Stretch/Shrink Fix
Added key 'moveable' to tabbars (tabbars are ordered with margins now, not with anchors to the previous widget) If stretching is forbidden by options the mapPanel will now update when the window is resized
This commit is contained in:
@@ -9,7 +9,9 @@ function UISplitter.create()
|
||||
end
|
||||
|
||||
function UISplitter:onHoverChange(hovered)
|
||||
if hovered then
|
||||
-- Check if margin can be changed
|
||||
local margin = (self.vertical and self:getMarginBottom() or self:getMarginRight())
|
||||
if hovered and (self:canUpdateMargin(margin + 1) ~= margin or self:canUpdateMargin(margin - 1) ~= margin) then
|
||||
if g_mouse.isCursorChanged() or g_mouse.isPressed() then return end
|
||||
if self:getWidth() > self:getHeight() then
|
||||
g_mouse.setVerticalCursor()
|
||||
|
Reference in New Issue
Block a user