Version 2.2 - retro layout + bug fixes

This commit is contained in:
OTCv8
2020-03-31 21:34:09 +02:00
parent 1df9b82846
commit 6b39f061ae
189 changed files with 3384 additions and 4603 deletions

View File

@@ -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

View File

@@ -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)