mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Rework hotkeys manager, fix many issues on it
This commit is contained in:
@@ -18,6 +18,11 @@ function UIPopupMenu:display(pos)
|
||||
return
|
||||
end
|
||||
|
||||
if g_ui.isMouseGrabbed() then
|
||||
self:destroy()
|
||||
return
|
||||
end
|
||||
|
||||
if currentMenu then
|
||||
currentMenu:destroy()
|
||||
end
|
||||
|
@@ -14,11 +14,17 @@ function UIScrollArea:onStyleApply(styleName, styleNode)
|
||||
for name,value in pairs(styleNode) do
|
||||
if name == 'vertical-scrollbar' then
|
||||
addEvent(function()
|
||||
self:setVerticalScrollBar(self:getParent():getChildById(value))
|
||||
local parent = self:getParent()
|
||||
if parent then
|
||||
self:setVerticalScrollBar(parent:getChildById(value))
|
||||
end
|
||||
end)
|
||||
elseif name == 'horizontal-scrollbar' then
|
||||
addEvent(function()
|
||||
self:setHorizontalScrollBar(self:getParent():getChildById(value))
|
||||
local parent = self:getParent()
|
||||
if parent then
|
||||
self:setHorizontalScrollBar(self:getParent():getChildById(value))
|
||||
end
|
||||
end)
|
||||
elseif name == 'inverted-scroll' then
|
||||
self:setInverted(value)
|
||||
|
Reference in New Issue
Block a user