Mercurial > parpg-source
diff gui/hud.py @ 119:2399a8c3da0c
Modified EquipmentSlot to display an image instead of a text.
Added EquipmentGui class, which handles the equipment slots of the player screen.
An EquipmentGui instance will be created in the InventoryGUI constructor.
The initializeInventory method of the Hud class supplies the players inventory and equipment to the InventoryGUI constructor.
author | KarstenBock@gmx.net |
---|---|
date | Wed, 05 Oct 2011 11:04:39 +0200 |
parents | 100a39fa64a2 |
children | adbcdb900fa9 |
line wrap: on
line diff
--- a/gui/hud.py Wed Oct 05 10:57:31 2011 +0200 +++ b/gui/hud.py Wed Oct 05 11:04:39 2011 +0200 @@ -157,7 +157,9 @@ """Initialize the inventory""" if not self.inventory: xml_file = vfs.VFS.open('gui/inventory.xml') - self.inventory = InventoryGUI(self.controller, xml_file, None) + player = self.model.game_state.getObjectById("PlayerCharacter") + self.inventory = InventoryGUI(self.controller, xml_file, + player.container, player.equip, None) # inv_callbacks = { # 'refreshReadyImages': self.refreshReadyImages, # 'toggleInventoryButton': self.toggleInventoryButton,