Пример #1
0
 def __init__(self, controller, gui, equip, callbacks, slot_size=(50, 50)):
     ContainerGUIBase.__init__(self, controller, gui)
     self.equip = equip
     self.equip_to_gui = {
         "head": "headSlot",
         "neck": "neckSlot",
         "body": "shirtSlot",
         "belt": "beltSlot",
         "leg": "pantsSlot",
         "feet": "bootsSlot",
         "l_arm": "leftHandSlot",
         "r_arm": "rightHandSlot",
     }
     self.setSlotEvents()
     self.slot_size = slot_size
Пример #2
0
 def __init__(self, controller, gui, container, callbacks):
     ContainerGUIBase.__init__(self, controller, gui)
     self.grid = self.gui.findChildByName("Grid")
     assert isinstance(self.grid, InventoryGrid)
     self.container = container
     self.setSlotEvents()