diff src/parpg/gui/hud.py @ 150:3fc7cfa80771

Modified InventoryGrid to set a name for each slot containing the index. Added getSlot method to InventoryGrid. Renamed InventoryGUI class to CharacterGUI. Added InventoryGUI class which handles the inventory part of the CharacterGUI. An InventoryGUI instance is now created in CharacterGUI.
author KarstenBock@gmx.net
date Wed, 05 Oct 2011 12:59:22 +0200
parents eab3e1e52497
children 04de7f38429a
line wrap: on
line diff
--- a/src/parpg/gui/hud.py	Wed Oct 05 11:04:39 2011 +0200
+++ b/src/parpg/gui/hud.py	Wed Oct 05 12:59:22 2011 +0200
@@ -26,7 +26,7 @@
 from parpg.gui.containergui import ContainerGUI
 from parpg.gui.dialoguegui import DialogueGUI
 from parpg.gui import drag_drop_data as data_drag
-from parpg.gui.inventorygui import InventoryGUI
+from parpg.gui.inventorygui import CharacterGUI
 from actionsbox import ActionsBox
 from parpg.components import container
 logger = logging.getLogger('hud')
@@ -158,7 +158,7 @@
         if not self.inventory:
             xml_file = vfs.VFS.open('gui/inventory.xml')
             player = self.model.game_state.getObjectById("PlayerCharacter")
-            self.inventory = InventoryGUI(self.controller, xml_file, 
+            self.inventory = CharacterGUI(self.controller, xml_file, 
                                           player.container, player.equip, None)
 #        inv_callbacks = {
 #            'refreshReadyImages': self.refreshReadyImages,