mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-20 06:33:26 +02:00
Version 2.2 - retro layout + bug fixes
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
function init()
|
||||
g_ui.importStyle('container')
|
||||
|
||||
connect(Container, { onOpen = onContainerOpen,
|
||||
onClose = onContainerClose,
|
||||
onSizeChange = onContainerChangeSize,
|
||||
@@ -50,10 +48,18 @@ function refreshContainerItems(container)
|
||||
end
|
||||
end
|
||||
|
||||
function toggleContainerPages(containerWindow, pages)
|
||||
containerWindow:getChildById('miniwindowScrollBar'):setMarginTop(pages and 42 or 22)
|
||||
containerWindow:getChildById('contentsPanel'):setMarginTop(pages and 42 or 22)
|
||||
containerWindow:getChildById('pagePanel'):setVisible(pages)
|
||||
function toggleContainerPages(containerWindow, hasPages)
|
||||
if hasPages == containerWindow.pagePanel:isOn() then
|
||||
return
|
||||
end
|
||||
containerWindow.pagePanel:setOn(hasPages)
|
||||
if hasPages then
|
||||
containerWindow.miniwindowScrollBar:setMarginTop(containerWindow.miniwindowScrollBar:getMarginTop() + containerWindow.pagePanel:getHeight())
|
||||
containerWindow.contentsPanel:setMarginTop(containerWindow.contentsPanel:getMarginTop() + containerWindow.pagePanel:getHeight())
|
||||
else
|
||||
containerWindow.miniwindowScrollBar:setMarginTop(containerWindow.miniwindowScrollBar:getMarginTop() - containerWindow.pagePanel:getHeight())
|
||||
containerWindow.contentsPanel:setMarginTop(containerWindow.contentsPanel:getMarginTop() - containerWindow.pagePanel:getHeight())
|
||||
end
|
||||
end
|
||||
|
||||
function refreshContainerPages(container)
|
||||
|
Reference in New Issue
Block a user