Code:
self.wndBeltInventoryLayer = None
self.wndBeltInventorySlot = None
self.expandBtn = None
self.minBtn = None
##activateall
self.UseItemBelt = None
self.expandBtn = self.GetChild("ExpandBtn")
self.minBtn = self.GetChild("MinimizeBtn")
##activateall
self.UseItemBelt = self.GetChild("UseBeltItemsButton")
self.expandBtn.SetEvent(ui.__mem_func__(self.OpenInventory))
self.minBtn.SetEvent(ui.__mem_func__(self.CloseInventory))
##activateall
self.UseItemBelt.SetEvent(self.ActivateAll)
self.wndBeltInventorySlot.RefreshSlot()
##activateall
def ActivateAll(self):
for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
slotNumber = item.BELT_INVENTORY_SLOT_START + i
net.SendItemUsePacket(slotNumber)
Beltinventorywindow.py: