mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
Rework hotkeys manager, fix many issues on it
This commit is contained in:
@@ -8,6 +8,7 @@ g_settings.getNode = g_configs.getNode
|
||||
g_settings.remove = g_configs.remove
|
||||
g_settings.setList = g_configs.setList
|
||||
g_settings.getList = g_configs.getList
|
||||
g_settings.save = g_configs.save
|
||||
|
||||
local function convertSettingValue(value)
|
||||
if type(value) == 'table' then
|
||||
|
@@ -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