Mercurial > parpg-source
diff gui/hud.py @ 120:adbcdb900fa9
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 | 2399a8c3da0c |
children | f7543a85c2ea |
line wrap: on
line diff
--- a/gui/hud.py Wed Oct 05 11:04:39 2011 +0200 +++ b/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,