mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-20 14:43:27 +02:00
Updated to OTCv8 3.1 rev 217
This commit is contained in:
@@ -94,6 +94,18 @@ function refreshContainerPages(container)
|
||||
nextPageButton:setEnabled(true)
|
||||
nextPageButton.onClick = function() g_game.seekInContainer(container:getId(), container:getFirstIndex() + container:getCapacity()) end
|
||||
end
|
||||
|
||||
local pagePanel = container.window:recursiveGetChildById('pagePanel')
|
||||
if pagePanel then
|
||||
pagePanel.onMouseWheel = function(widget, mousePos, mouseWheel)
|
||||
if pages == 1 then return end
|
||||
if mouseWheel == MouseWheelUp then
|
||||
return prevPageButton.onClick()
|
||||
else
|
||||
return nextPageButton.onClick()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function onContainerOpen(container, previousContainer)
|
||||
@@ -126,6 +138,20 @@ function onContainerOpen(container, previousContainer)
|
||||
child:onDrop(widget, mousePos, true)
|
||||
end
|
||||
end
|
||||
|
||||
containerWindow.onMouseRelease = function(widget, mousePos, mouseButton)
|
||||
if mouseButton == MouseButton4 then
|
||||
if container:hasParent() then
|
||||
return g_game.openParent(container)
|
||||
end
|
||||
elseif mouseButton == MouseButton5 then
|
||||
for i, item in ipairs(container:getItems()) do
|
||||
if item:isContainer() then
|
||||
return g_game.open(item, container)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- this disables scrollbar auto hiding
|
||||
local scrollbar = containerWindow:getChildById('miniwindowScrollBar')
|
||||
|
Reference in New Issue
Block a user