diff src/parpg/gui/hud.py @ 149:eab3e1e52497

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 140e5e93f026
children 3fc7cfa80771
line wrap: on
line diff
--- a/src/parpg/gui/hud.py	Wed Oct 05 10:57:31 2011 +0200
+++ b/src/parpg/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,