new widget, UICheckBox

This commit is contained in:
Eduardo Bart
2011-11-15 21:47:32 -02:00
parent 9c986c4c5c
commit 532d7f239f
31 changed files with 449 additions and 133 deletions

View File

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

View File

@@ -7,4 +7,4 @@ Panel
MenuButton
text: Quit
onClick: exit()
@onClick: exit()