mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-19 22:23:28 +02:00
Version 2.2 - retro layout + bug fixes
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
PageButton < Button
|
||||
size: 30 18
|
||||
margin: 1
|
||||
|
||||
|
||||
ContainerWindow < MiniWindow
|
||||
height: 150
|
||||
|
||||
UIItem
|
||||
id: containerItemWidget
|
||||
virtual: true
|
||||
size: 16 16
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
margin-top: 4
|
||||
margin-left: 4
|
||||
|
||||
UIButton
|
||||
id: upButton
|
||||
anchors.top: lockButton.top
|
||||
anchors.right: lockButton.left
|
||||
margin-right: 3
|
||||
size: 14 14
|
||||
image-source: /images/ui/miniwindow_buttons
|
||||
image-clip: 42 0 14 14
|
||||
|
||||
$hover:
|
||||
image-clip: 42 14 14 14
|
||||
|
||||
$pressed:
|
||||
image-clip: 42 28 14 14
|
||||
|
||||
Panel
|
||||
id: pagePanel
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: miniwindowTopBar.bottom
|
||||
height: 20
|
||||
margin: 2 3 0 3
|
||||
background: #00000066
|
||||
visible: false
|
||||
|
||||
Label
|
||||
id: pageLabel
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin-top: 2
|
||||
text-auto-resize: true
|
||||
|
||||
PageButton
|
||||
id: prevPageButton
|
||||
text: <
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
|
||||
PageButton
|
||||
id: nextPageButton
|
||||
text: >
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
|
||||
MiniWindowContents
|
||||
padding-right: 0
|
||||
layout:
|
||||
type: grid
|
||||
cell-size: 34 34
|
||||
flow: true
|
@@ -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