mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
new widget, UICheckBox
This commit is contained in:
@@ -17,10 +17,9 @@ local InventorySlotAmmo = 10
|
||||
-- public functions
|
||||
function Inventory.create()
|
||||
window = loadUI("/inventory/inventory.otui", Game.gameRightPanel)
|
||||
|
||||
|
||||
local itemWidget = window:getChildById('feet')
|
||||
window:setHeight(itemWidget:getPosition().y + itemWidget:getHeight() - window:getPosition().y)
|
||||
|
||||
end
|
||||
|
||||
function Inventory.destroy()
|
||||
@@ -52,7 +51,7 @@ function Inventory.onInventoryChange(slot, item)
|
||||
elseif slot == InventorySlotAmmo then
|
||||
slotId = 'ammo'
|
||||
end
|
||||
|
||||
|
||||
local itemWidget = window:getChildById(slotId)
|
||||
itemWidget:setItem(item)
|
||||
end
|
||||
|
@@ -7,4 +7,4 @@ Panel
|
||||
|
||||
MenuButton
|
||||
text: Quit
|
||||
onClick: exit()
|
||||
@onClick: exit()
|
Reference in New Issue
Block a user