mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
ui changes
* create UIResizeBorder * restore miniwindow * scroll fixes
This commit is contained in:
@@ -13,7 +13,7 @@ function Inventory.init()
|
||||
|
||||
Keyboard.bindKeyDown('Ctrl+I', Inventory.toggle)
|
||||
|
||||
inventoryWindow = displayUI('inventory.otui', GameInterface.getRightPanel())
|
||||
inventoryWindow = displayUI('inventory.otui', GameInterface.getRightPanel()):getChildById('inventoryWindow')
|
||||
inventoryButton = TopMenu.addGameToggleButton('inventoryButton', 'Inventory (Ctrl+I)', 'inventory.png', Inventory.toggle)
|
||||
inventoryButton:setOn(true)
|
||||
|
||||
|
@@ -1,111 +1,113 @@
|
||||
BorderlessGameWindow
|
||||
id: inventoryWindow
|
||||
MiniWindow
|
||||
text: Inventory
|
||||
icon: inventory.png
|
||||
width: 192
|
||||
height: 154
|
||||
margin-top: 10
|
||||
margin-left: 6
|
||||
margin-right: 6
|
||||
|
||||
Item
|
||||
// head
|
||||
id: slot1
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
&position: {x=65535, y=1, z=0}
|
||||
MiniWindowContents
|
||||
id: inventoryWindow
|
||||
|
||||
Item
|
||||
// armor
|
||||
id: slot4
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=4, z=0}
|
||||
Item
|
||||
// head
|
||||
id: slot1
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
&position: {x=65535, y=1, z=0}
|
||||
|
||||
Item
|
||||
// legs
|
||||
id: slot7
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=7, z=0}
|
||||
Item
|
||||
// armor
|
||||
id: slot4
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=4, z=0}
|
||||
|
||||
Item
|
||||
// feet
|
||||
id: slot8
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=8, z=0}
|
||||
Item
|
||||
// legs
|
||||
id: slot7
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=7, z=0}
|
||||
|
||||
Item
|
||||
// necklace
|
||||
id: slot2
|
||||
anchors.top: parent.top
|
||||
anchors.right: slot1.left
|
||||
margin-top: 10
|
||||
margin-right: 5
|
||||
&position: {x=65535, y=2, z=0}
|
||||
Item
|
||||
// feet
|
||||
id: slot8
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
margin-bottom: 10
|
||||
&position: {x=65535, y=8, z=0}
|
||||
|
||||
Item
|
||||
// left
|
||||
id: slot6
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=6, z=0}
|
||||
Item
|
||||
// necklace
|
||||
id: slot2
|
||||
anchors.top: parent.top
|
||||
anchors.right: slot1.left
|
||||
margin-top: 10
|
||||
margin-right: 5
|
||||
&position: {x=65535, y=2, z=0}
|
||||
|
||||
Item
|
||||
// ring
|
||||
id: slot9
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=9, z=0}
|
||||
Item
|
||||
// left
|
||||
id: slot6
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=6, z=0}
|
||||
|
||||
Item
|
||||
// backpack
|
||||
id: slot3
|
||||
anchors.top: parent.top
|
||||
anchors.left: slot1.right
|
||||
margin-top: 10
|
||||
margin-left: 5
|
||||
&position: {x=65535, y=3, z=0}
|
||||
Item
|
||||
// ring
|
||||
id: slot9
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=9, z=0}
|
||||
|
||||
Item
|
||||
// right
|
||||
id: slot5
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=5, z=0}
|
||||
Item
|
||||
// backpack
|
||||
id: slot3
|
||||
anchors.top: parent.top
|
||||
anchors.left: slot1.right
|
||||
margin-top: 10
|
||||
margin-left: 5
|
||||
&position: {x=65535, y=3, z=0}
|
||||
|
||||
Item
|
||||
// ammo
|
||||
id: slot10
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=10, z=0}
|
||||
Item
|
||||
// right
|
||||
id: slot5
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=5, z=0}
|
||||
|
||||
GameLabel
|
||||
id: soul
|
||||
anchors.top: slot9.bottom
|
||||
anchors.bottom: slot8.bottom
|
||||
anchors.left: slot9.left
|
||||
anchors.right: slot9.right
|
||||
margin-top: 5
|
||||
text-align: center
|
||||
image-source: /core_styles/styles/images/panel_flat.png
|
||||
image-border: 1
|
||||
Item
|
||||
// ammo
|
||||
id: slot10
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
margin-top: 5
|
||||
&position: {x=65535, y=10, z=0}
|
||||
|
||||
GameLabel
|
||||
id: capacity
|
||||
anchors.top: slot10.bottom
|
||||
anchors.bottom: slot8.bottom
|
||||
anchors.left: slot10.left
|
||||
anchors.right: slot10.right
|
||||
margin-top: 5
|
||||
text-align: center
|
||||
image-source: /core_styles/styles/images/panel_flat.png
|
||||
image-border: 1
|
||||
GameLabel
|
||||
id: soul
|
||||
anchors.top: slot9.bottom
|
||||
anchors.bottom: slot8.bottom
|
||||
anchors.left: slot9.left
|
||||
anchors.right: slot9.right
|
||||
margin-top: 5
|
||||
text-align: center
|
||||
image-source: /core_styles/styles/images/panel_flat.png
|
||||
image-border: 1
|
||||
|
||||
GameLabel
|
||||
id: capacity
|
||||
anchors.top: slot10.bottom
|
||||
anchors.bottom: slot8.bottom
|
||||
anchors.left: slot10.left
|
||||
anchors.right: slot10.right
|
||||
margin-top: 5
|
||||
text-align: center
|
||||
image-source: /core_styles/styles/images/panel_flat.png
|
||||
image-border: 1
|
||||
|
||||
|
Reference in New Issue
Block a user