mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
UI tweaks
This commit is contained in:
@@ -27,9 +27,10 @@ ContainerWindow < MiniWindow
|
||||
image-clip: 42 28 14 14
|
||||
|
||||
MiniWindowContents
|
||||
padding: 27 6 6 8
|
||||
padding-right: 0
|
||||
layout:
|
||||
type: grid
|
||||
cell-size: 34 34
|
||||
cell-size: 40 40
|
||||
flow: true
|
||||
auto-spacing: true
|
||||
cell-spacing: 0
|
||||
|
||||
|
@@ -24,6 +24,10 @@ local function onContainerOpen(container, previousContainer)
|
||||
containerWindow:hide()
|
||||
end
|
||||
|
||||
-- this disables scrollbar auto hiding
|
||||
local scrollbar = containerWindow:getChildById('miniwindowScrollBar')
|
||||
scrollbar:mergeStyle({ ['$disabled'] = { ['width'] = scrollbar:getWidth() } })
|
||||
|
||||
local upButton = containerWindow:getChildById('upButton')
|
||||
upButton.onClick = function()
|
||||
g_game.openParent(container)
|
||||
@@ -41,6 +45,7 @@ local function onContainerOpen(container, previousContainer)
|
||||
local itemWidget = createWidget('Item', containerPanel)
|
||||
itemWidget:setId('item' .. slot)
|
||||
itemWidget:setItem(container:getItem(slot))
|
||||
itemWidget:setMargin(3)
|
||||
itemWidget.position = container:getSlotPosition(slot)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user