def show(self): InventoryPage.show(self) if not self.tabBar: self.clearTabs() for id in range(3): self.addPanel(id) self.refreshList() self.tabBar.unstash() activeShipId = localAvatar.getActiveShipId() if activeShipId: self.tabBar.selectTab(activeShipId) self.showPanel(activeShipId)
def __init__(self): if not ShipPage.BottleFrame: gui = loader.loadModel('models/gui/gui_ship_window') ShipPage.BottleFrame = gui.find('**/ship_bottle').copyTo(NodePath('')) ShipPage.BottleFrame.flattenStrong() InventoryPage.__init__(self) self.initialiseoptions(ShipPage) self.panels = { } self.pendingRequestInventory = None self.currentPanel = 0 self.tabBar = None self.accept('DistributedShipOV-announceGenerate', self.shipOVArrived) self.accept('DistributedShipOV-delete', self.shipOVRemoved)
def hide(self): InventoryPage.hide(self) if self.tabBar: self.tabBar.stash()