def __init__(self, title, nameLists, showClose=False, allowEscape=True): GuiPanel.GuiPanel.__init__(self, title, self.width, self.height, showClose) self.initialiseoptions(NamePanelGui) self.nameLists = nameLists self.tumblerList = [] self.name = '' self.nameIndices = [0, 0] self.isTypedName = 0 charGui = loader.loadModel('models/gui/char_gui') if PICK_A_NAME_ENABLED: self.nameModeButton = GuiButton.GuiButton(helpText=PLocalizer.TypeANameHelp, command=self.toggleNameMode, borderWidth=PiratesGuiGlobals.BorderWidth, text=PLocalizer.TypeAName, frameColor=PiratesGuiGlobals.ButtonColor1, text_fg=PiratesGuiGlobals.TextFG2, text_pos=(0, -0.01), frameSize=(-0.09, 0.09, -0.015, 0.065), text_scale=PiratesGuiGlobals.TextScaleLarge, pad=(0.01, 0.01), parent=self, pos=(0.12, 0, 0.06)) self.commitButton = DialogButton.DialogButton(command=self.handleCommit, text=PLocalizer.Submit, text_fg=PiratesGuiGlobals.TextFG2, text_pos=(0, -0.01), frameSize=(-0.09, 0.09, -0.015, 0.065), text_scale=PiratesGuiGlobals.TextScaleLarge, parent=self, pos=(self.width - 0.15, 0, 0.07)) if showClose: self.cancelButton = DialogButton.DialogButton(command=self.closePanel, text=PLocalizer.lClose, text_fg=PiratesGuiGlobals.TextFG2, text_pos=(0, -0.01), frameSize=(-0.09, 0.09, -0.015, 0.065), text_scale=PiratesGuiGlobals.TextScaleLarge, parent=self, pos=(0.15, 0, 0.07)) if allowEscape: self.acceptOnce('escape', self.closePanel) self.accept('updateNameResult', self.__updateNameResult) self.pickAName = DirectFrame(parent=self, relief=None) self.nameResult = DirectFrame(parent=self.pickAName, relief=DGG.FLAT, text='', text_align=TextNode.ACenter, text_scale=PiratesGuiGlobals.TextScaleTitleMed, text_fg=PiratesGuiGlobals.TextFG1, text_shadow=PiratesGuiGlobals.TextShadow, frameColor=(0, 0, 0, 0.5), text_pos=(0, 0.007), frameSize=(-0.3, 0.3, -0.015, 0.065), text_font=PiratesGlobals.getPirateOutlineFont(), textMayChange=1) self.nameResult.setPos(self.width / 2, 0, self.height - 0.14) for i in range(len(self.nameLists)): tPos = (i + 1) * (self.width / (len(self.nameLists) + 1)) tumbler = PNameTumbler.PNameTumbler(self.nameLists[i], '') tumbler.reparentTo(self.pickAName) tumbler.setPos(tPos, 0, self.height * 0.55) tumbler.setScale(0.7) self.tumblerList.append(tumbler) self.randomButton = GuiButton.GuiButton(command=self.randomName, text=PLocalizer.Random, text_fg=PiratesGuiGlobals.TextFG2, text_pos=(0, -0.01), frameSize=(-0.09, 0.09, -0.015, 0.065), text_scale=PiratesGuiGlobals.TextScaleLarge, parent=self.pickAName, pos=(self.width / 2.0, 0, 0.12)) self.randomName() self.typeAName = DirectFrame(parent=self, relief=None) self.typeAName.hide() self.nameEntry = DirectEntry(parent=self.typeAName, relief=DGG.FLAT, text='', entryFont=PiratesGlobals.getPirateOutlineFont(), text_scale=PiratesGuiGlobals.TextScaleLarge, text_shadow=PiratesGuiGlobals.TextShadow, text_fg=PiratesGuiGlobals.TextFG1, width=MAX_NAME_WIDTH, frameColor=(0, 0, 0, 0.5), text_pos=(0, 0.007), frameSize=(-0.3, 0.3, -0.015, 0.065), numLines=1, focus=1, cursorKeys=1, text_align=TextNode.ACenter, command=self.handleCommit) self.nameEntry.setPos(self.width / 2, 0, self.height - 0.25) self.instructions = DirectFrame(parent=self.typeAName, relief=None, text=PLocalizer.TypeANameInstructions, text_align=TextNode.ACenter, text_scale=PiratesGuiGlobals.TextScaleLarge, text_fg=PiratesGuiGlobals.TextFG2, text_shadow=PiratesGuiGlobals.TextShadow, frameColor=(0, 0, 0, 0.5), text_pos=(0, 0.007), frameSize=(-0.3, 0.3, -0.015, 0.065), textMayChange=1, text_wordwrap=15) self.instructions.setPos(self.width / 2, 0, self.height - 0.35) charGui.removeNode() return
def __init__(self, inventory, name): GuiPanel.GuiPanel.__init__(self, name, self.width, self.height, showClose = False) self.setPos(-1.25, 0, -0.66000000000000003) self.initialiseoptions(ShipStoreGUI) self.balance = 0 self.purchaseInventory = [ [ ItemId.INTERCEPTOR_L1, 1]] self.sellInventory = [] self.statData = [] self.namePanel = None self.updateStats() self.storeInventory = ShipItemList.ShipItemList(inventory, self.height - 0.10000000000000001, buy = PiratesGuiGlobals.InventoryAdd) self.storeInventory.reparentTo(self) self.storeInventory.setPos(0.02, 0, 0.02) self.purchaseTitle = DirectFrame(parent = self, relief = None, text = PLocalizer.InventoryTypeNames[self.purchaseInventory[0][0]], text_align = TextNode.ALeft, text_scale = PiratesGuiGlobals.TextScaleLarge, text_pos = (0.029999999999999999, 0.01), text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, textMayChange = 1) self.purchaseTitle.setPos(self.storeInventory.width, 0, 0.70699999999999996 + (self.height - 0.065000000000000002) / 2.5) self.card = loader.loadModel('models/textureCards/shipCatalog') self.shipImage = DirectFrame(parent = self, relief = DGG.FLAT, image_scale = 0.20000000000000001, frameColor = (0, 0, 0, 1.0), borderWidth = PiratesGuiGlobals.BorderWidthSmall, pad = (0.01, 0.01), frameSize = (-0.26000000000000001, 0.26000000000000001, -0.185, 0.185), textMayChange = 1, pos = (self.width * 0.71999999999999997, 0, 1)) self.shipImage.setTransparency(1) barChartWidth = self.width - self.storeInventory.width + 0.040000000000000001 self.shipStats = BarChart.BarChart(self.statData, 0.25, barChartWidth, PLocalizer.ShipProfile, PiratesGuiGlobals.TextFG1) self.shipStats.reparentTo(self) self.shipStats.setPos(self.storeInventory.width + 0.029999999999999999, 0, 0.12) self.descText = DirectFrame(parent = self, relief = None, text = PLocalizer.ShipDescriptions[self.purchaseInventory[0][0]], text_align = TextNode.ALeft, text_scale = PiratesGuiGlobals.TextScaleMed, text_pos = (0.029999999999999999, 0.01), text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, frameColor = (0, 0, 0, 0), frameSize = (0.02, self.width - self.storeInventory.width - 0.02, 0, 0.050000000000000003), textMayChange = 1, text_wordwrap = 18, pos = (self.storeInventory.width, 0, 0.75)) self.balanceTitle = DirectFrame(parent = self, relief = None, text = PLocalizer.Cost, text_align = TextNode.ALeft, text_scale = PiratesGuiGlobals.TextScaleLarge, text_pos = (0.31, 0.41099999999999998), text_fg = PiratesGuiGlobals.TextFG1, text_shadow = PiratesGuiGlobals.TextShadow, textMayChange = 0, pos = (self.columnWidth, 0, -0.01)) self.goldTitle = DirectFrame(parent = self, relief = None, text = '%s:' % PLocalizer.MoneyName, text_align = TextNode.ALeft, text_scale = PiratesGuiGlobals.TextScaleLarge, text_pos = (0.31, 0.41099999999999998), text_fg = PiratesGuiGlobals.TextFG1, text_shadow = PiratesGuiGlobals.TextShadow, textMayChange = 0, pos = (self.columnWidth, 0, 0.040000000000000001)) coinImage = loader.loadModel('models/gui/toplevel_gui').find('**/treasure_w_coin*') self.balanceValue = DirectFrame(parent = self, relief = None, text = str(self.balance), text_align = TextNode.ARight, text_scale = PiratesGuiGlobals.TextScaleLarge, text_pos = (0.53000000000000003, 0.41099999999999998), text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, textMayChange = 1, image = coinImage, image_scale = 0.14999999999999999, image_pos = (0.56000000000000005, 0, 0.42499999999999999), pos = (self.columnWidth, 0, -0.01)) self.goldValue = DirectFrame(parent = self, relief = None, text = str(localAvatar.getMoney()), text_align = TextNode.ARight, text_scale = PiratesGuiGlobals.TextScaleLarge, text_pos = (0.53000000000000003, 0.41099999999999998), text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, textMayChange = 0, image = coinImage, image_scale = 0.14999999999999999, image_pos = (0.56000000000000005, 0, 0.42499999999999999), pos = (self.columnWidth, 0, 0.040000000000000001)) coinImage.removeNode() self.commitButton = DialogButton.DialogButton(command = self.handleCommitPurchase, buttonStyle = DialogButton.DialogButton.YES, parent = self, relief = None, text = PLocalizer.PurchaseCommit, text_fg = PiratesGuiGlobals.TextFG2, text_scale = PiratesGuiGlobals.TextScaleLarge, textMayChange = 0, pos = (self.width - 0.39000000000000001, 0, 0.070000000000000007), sortOrder = 0) lockImage = loader.loadModel('models/gui/toplevel_gui').find('**/pir_t_gui_gen_key_subscriber') self.lock = DirectFrame(parent = self.commitButton, relief = None, image = lockImage, image_scale = 0.14999999999999999, pos = (-0.059999999999999998, 0, 0)) self.lock.hide() self.closeButton = DialogButton.DialogButton(command = self.closePanel, buttonStyle = DialogButton.DialogButton.NO, parent = self, relief = None, text = PLocalizer.lClose, text_fg = PiratesGuiGlobals.TextFG2, text_scale = PiratesGuiGlobals.TextScaleLarge, textMayChange = 0, pos = (self.width - 0.14499999999999999, 0, 0.070000000000000007)) self.updateProfile() self.accept(InventoryGlobals.getCategoryChangeMsg(localAvatar.getInventoryId(), InventoryType.ItemTypeMoney), self.updateBalance) self.accept(PiratesGuiGlobals.InventoryBuyEvent, self.handleBuyItem) self.accept(PiratesGuiGlobals.InventorySellEvent, self.handleSellItem) self.acceptOnce('escape', self.closePanel) base.ssg = self
def __init__(self, name, stats, playerStats, ship): GuiPanel.GuiPanel.__init__(self, '', self.width, self.height, showClose = False) self.ship = ship self.stats = stats self.playerStats = playerStats self.plunderHeight = 1.6499999999999999 self.initialiseoptions(HighSeasScoreboard) self.leftPanel = None self.rightPanel = None self.addedLootInfoText = 0 self.autoPlundered = 0 self.preAutoPlundered = 0 self.displayedGold = 0 titleTxt = PLocalizer.ScoreboardTitle if self.ship.shipClass == ShipGlobals.BLACK_PEARL: titleTxt = PLocalizer.BlackPearlScoreboard else: titleTxt = PLocalizer.LootScoreboard self.title = DirectLabel(parent = self, relief = None, text = titleTxt, text_align = TextNode.ALeft, text_scale = self.titleHeight, text_fg = PiratesGuiGlobals.TextFG10, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.029999999999999999, 0, self.height - self.titleHeight - 0.029999999999999999), text_font = PiratesGlobals.getPirateOutlineFont(), textMayChange = 1) self.closeButton = DialogButton.DialogButton(parent = self, buttonStyle = DialogButton.DialogButton.NO, text = PLocalizer.lClose, pos = (1.05, 0, 0.074999999999999997), command = self.closePanel) self.labels = [] self.grids = { } self.manager = base.localAvatar.guiMgr.inventoryUIManager self.buttonSize = self.manager.standardButtonSize main_gui = loader.loadModel('models/gui/gui_main') generic_x = main_gui.find('**/x2') generic_box = main_gui.find('**/exit_button') generic_box_over = main_gui.find('**/exit_button_over') main_gui.removeNode() self.newCloseButton = GuiButton.GuiButton(parent = self, relief = None, pos = (2.2999999999999998, 0, 1.0800000000000001), image = (generic_box, generic_box, generic_box_over, generic_box), image_scale = 0.40000000000000002, command = self.closePanel) xButton = OnscreenImage(parent = self.newCloseButton, image = generic_x, scale = 0.20000000000000001, pos = (-0.25600000000000001, 0, 0.76600000000000001)) gui = loader.loadModel('models/gui/toplevel_gui') buttonImage = (gui.find('**/generic_button'), gui.find('**/generic_button_down'), gui.find('**/generic_button_over'), gui.find('**/generic_button_disabled')) gui.removeNode() self.takeAllButton = DirectButton(parent = self, relief = None, image = buttonImage, image_scale = (0.34999999999999998, 1.0, 0.22), image0_color = VBase4(0.65000000000000002, 0.65000000000000002, 0.65000000000000002, 1), image1_color = VBase4(0.40000000000000002, 0.40000000000000002, 0.40000000000000002, 1), image2_color = VBase4(0.90000000000000002, 0.90000000000000002, 0.90000000000000002, 1), image3_color = VBase4(0.40999999999999998, 0.40000000000000002, 0.40000000000000002, 1), text = PLocalizer.InventoryPlunderTakeAll, text_font = PiratesGlobals.getPirateBoldOutlineFont(), text_align = TextNode.ACenter, text_pos = (0, -0.01), text_scale = PiratesGuiGlobals.TextScaleLarge, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, pos = (1.3, 0, 0.074999999999999997), command = self.takeAllLoot) self.takeAllIncidentalsButton = DirectButton(parent = self, relief = None, image = buttonImage, image_scale = (0.34999999999999998, 1.0, 0.22), image0_color = VBase4(0.65000000000000002, 0.65000000000000002, 0.65000000000000002, 1), image1_color = VBase4(0.40000000000000002, 0.40000000000000002, 0.40000000000000002, 1), image2_color = VBase4(0.90000000000000002, 0.90000000000000002, 0.90000000000000002, 1), image3_color = VBase4(0.40999999999999998, 0.40000000000000002, 0.40000000000000002, 1), text = PLocalizer.InventoryPlunderTakeAllSundries, text_font = PiratesGlobals.getPirateBoldOutlineFont(), text_align = TextNode.ACenter, text_pos = (0, -0.01), text_scale = PiratesGuiGlobals.TextScaleLarge, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.80000000000000004, 0, 0.074999999999999997), command = self.requestAllIncidentals) self.setBin('gui-fixed', -1) self.autoLootList = [ InventoryType.ItemTypeMoney, InventoryCategory.MONEY] self.incidentalsList = [ InventoryType.ItemTypeMoney, InventoryType.ItemTypeConsumable, InventoryType.TreasureCollection, InventoryCategory.CARDS, InventoryCategory.MONEY, InventoryCategory.WEAPON_PISTOL_AMMO, InventoryCategory.WEAPON_GRENADE_AMMO, InventoryCategory.WEAPON_CANNON_AMMO, InventoryCategory.WEAPON_DAGGER_AMMO] self.incidentalsDict = { } base.hss = self self.initFlag = 0 self.initPlunder()
def __init__(self, npc, shopId, **kw): optiondefs = (('relief', None, None), ('framSize', (0, self.width, 0, self.height), None), ('sortOrder', 20, None)) self.defineoptions(kw, optiondefs) DirectFrame.__init__(self, None, **None) self.initialiseoptions(BarberStoreGUI) self.pirate = None self.camIval = None self.buttons = [] self.buttonIndex = 0 self.itemAmount = 0 self.currentPage = None self.confirmBox = None self.buttonsPerPage = 3 self.displayRegionStates = { } self.numPages = 0 gui = loader.loadModel('models/gui/toplevel_gui') self.CoinImage = gui.find('**/treasure_w_coin*') self.ParchmentIcon = gui.find('**/main_gui_quest_scroll') self.barberIconsA = loader.loadModel('models/gui/char_gui') self.barberIconsB = loader.loadModel('models/textureCards/shopIcons') self.ShirtIcon = loader.loadModel('models/gui/char_gui').find('**/chargui_cloth') self.LockIcon = gui.find('**/pir_t_gui_gen_key_subscriber') self.backTabParent = self.attachNewNode('backTabs', sort = 0) self.panel = GuiPanel.GuiPanel(None, self.width, self.height, parent = self, showClose = False) self.setPos(0.0, 0, -0.75) self.balance = 0 self.npc = npc self.rootTitle = PLocalizer.ShopBarber self.paid = Freebooter.getPaidStatus(localAvatar.getDoId()) self.shopId = shopId if localAvatar.gameFSM.camIval is not None: if localAvatar.gameFSM.camIval.isPlaying(): localAvatar.gameFSM.camIval.finish() self.initialCamPos = camera.getPos() self.initialCamHpr = camera.getHpr() self.initialPirateH = 0 self.cartWidth = self.columnWidth - 0.10000000000000001 self.cartHeight = self.height - 0.25 self.cartFrame = DirectFrame(parent = self.panel, relief = None, frameSize = (0, self.cartWidth, 0, self.cartHeight)) self.cartFrame.setPos(self.columnWidth + 0.025000000000000001, 0, 0.080000000000000002) self.categoryText = [ [ PLocalizer.Hat, PLocalizer.Hats], [ PLocalizer.Shirt, PLocalizer.Shirts], [ PLocalizer.Vest, PLocalizer.Vests], [ PLocalizer.Coat, PLocalizer.Coats], [ PLocalizer.Pants, PLocalizer.Pants], [ PLocalizer.Belt, PLocalizer.Belts], [ None, None], [ PLocalizer.Shoe, PLocalizer.Shoes]] self.frontTabParent = self.panel.attachNewNode('frontTab', sort = 2) self.myGoldTitle = DirectFrame(parent = self.cartFrame, relief = None, text = PLocalizer.YourMoney, text_fg = PiratesGuiGlobals.TextFG2, text_align = TextNode.ALeft, text_scale = PiratesGuiGlobals.TextScaleLarge, text_shadow = PiratesGuiGlobals.TextShadow, pos = (-0.375, 0, 0.17499999999999999)) self.myGold = DirectFrame(parent = self.cartFrame, relief = None, text = str(localAvatar.getMoney()), text_fg = PiratesGuiGlobals.TextFG2, text_align = TextNode.ARight, text_scale = PiratesGuiGlobals.TextScaleLarge, text_shadow = PiratesGuiGlobals.TextShadow, textMayChange = 1, image = self.CoinImage, image_scale = 0.14999999999999999, image_pos = (0.029999999999999999, 0, 0.014999999999999999), pos = (-0.059999999999999998, 0, 0.17499999999999999)) self.closeButton = DialogButton.DialogButton(command = self.closePanel, parent = self.cartFrame, text = PLocalizer.lClose, text_fg = PiratesGuiGlobals.TextFG2, text_pos = (0.02, -(PiratesGuiGlobals.TextScaleLarge) * 0.25), text_scale = PiratesGuiGlobals.TextScaleLarge, text_shadow = PiratesGuiGlobals.TextShadow, buttonStyle = DialogButton.DialogButton.NO) self.closeButton.setPos(0, 0, 0.0050000000000000001) tGui = loader.loadModel('models/gui/triangle') triangle = (tGui.find('**/triangle'), tGui.find('**/triangle_down'), tGui.find('**/triangle_over')) self.nextPageButton = DirectButton(parent = self.cartFrame, relief = None, state = DGG.DISABLED, image = triangle, image_scale = 0.065000000000000002, pos = (0.17999999999999999, 0.0, 0.10000000000000001), rolloverSound = None, command = self.nextPage) self.prevPageButton = DirectButton(parent = self.cartFrame, relief = None, state = DGG.DISABLED, image = triangle, image_scale = -0.065000000000000002, pos = (-0.17999999999999999, 0.0, 0.10000000000000001), rolloverSound = None, command = self.previousPage) self.pageNumber = DirectFrame(parent = self.cartFrame, relief = None, text = '', text_fg = PiratesGuiGlobals.TextFG2, text_align = TextNode.ACenter, text_scale = PiratesGuiGlobals.TextScaleLarge, text_pos = (0.0, 0.0), text_shadow = PiratesGuiGlobals.TextShadow, pos = (0, 0, 0.089999999999999997)) self.titleLabel = DirectLabel(parent = self, relief = None, text = '', text_fg = PiratesGuiGlobals.TextFG1, text_align = TextNode.ACenter, text_scale = PiratesGuiGlobals.TextScaleLarge * 1.3, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.62, 0.0, 1.3300000000000001)) self.titleLabel.setBin('gui-fixed', 1) self.createPirate() charGui = loader.loadModel('models/gui/char_gui') self.rotateSlider = DirectSlider(parent = base.a2dBottomLeft, relief = None, command = self.rotatePirate, image = charGui.find('**/chargui_slider_small'), image_scale = (2.1499999999999999, 2.1499999999999999, 1.5), thumb_relief = None, thumb_image = (charGui.find('**/chargui_slider_node'), charGui.find('**/chargui_slider_node_down'), charGui.find('**/chargui_slider_node_over')), pos = (0.80000000000000004, 0.0, 0.089999999999999997), text_align = TextNode.ACenter, text_scale = (0.10000000000000001, 0.10000000000000001), text_pos = (0.0, 0.10000000000000001), text_fg = PiratesGuiGlobals.TextFG1, scale = 0.42999999999999999, text = PLocalizer.RotateSlider, value = 0.5, sortOrder = -1) self.rotateSlider['extraArgs'] = [ self.rotateSlider] self.rotateSliderOrigin = 0.5 self.accept('mouse1', self._startMouseReadTask) self.accept('mouse1-up', self._stopMouseReadTask) self.clothWindows = [] self.clothRenders = [] self.clothHumans = [] self.clothCameraNPs = [] self.clothCameras = [] self.createDisplayRegions() self.alertDialog = None self.accept('aspectRatioChanged', self.aspectRatioChange) self.accept('NonPayerPanelShown', self.hideDisplayRegions) self.accept('NonPayerPanelHidden', self.showDisplayRegions) self.accept('MainMenuShown', self.hideDisplayRegions) self.accept('MainMenuHidden', self.showDisplayRegions) self.accept('GUIShown', self.showDisplayRegions) self.accept('GUIHidden', self.hideDisplayRegions) localAvatar.guiMgr.chatPanel.show() localAvatar.guiMgr.chatPanel.startFadeTextIval() self.model = loader.loadModel('models/gui/gui_shop_tailor') self.model.reparentTo(self.panel) self.model.setBin('gui-fixed', 0) self.model.setPos(0.625, 0.0, 1.05) self.model.setScale(0.33700000000000002, 0.0, 0.32700000000000001) localAvatar.guiMgr.hideTrackedQuestInfo() self.initTabs() self.updateBalance() self.focusCamera()
def __init__(self, name, stats, playerStats, ship): GuiPanel.GuiPanel.__init__(self, '', self.width, self.height, showClose=False) self.ship = ship self.stats = stats self.playerStats = playerStats self.initialiseoptions(HighSeasScoreboard) self.leftPanel = None self.rightPanel = None titleTxt = PLocalizer.ScoreboardTitle if self.ship.shipClass == ShipGlobals.BLACK_PEARL: titleTxt = PLocalizer.BlackPearlScoreboard else: titleTxt = PLocalizer.LootScoreboard self.title = DirectLabel( parent=self, relief=None, text=titleTxt, text_align=TextNode.ALeft, text_scale=self.titleHeight, text_fg=PiratesGuiGlobals.TextFG10, text_shadow=PiratesGuiGlobals.TextShadow, pos=(0.029999999999999999, 0, self.height - self.titleHeight - 0.029999999999999999), text_font=PiratesGlobals.getPirateOutlineFont(), textMayChange=1) self.closeButton = DialogButton.DialogButton( parent=self, buttonStyle=DialogButton.DialogButton.NO, text=PLocalizer.lClose, pos=(1.05, 0, 0.074999999999999997), command=self.closePanel) self.grids = {} self.manager = base.localAvatar.guiMgr.inventoryUIManager self.buttonSize = self.manager.standardButtonSize main_gui = loader.loadModel('models/gui/gui_main') generic_x = main_gui.find('**/x2') generic_box = main_gui.find('**/exit_button') generic_box_over = main_gui.find('**/exit_button_over') main_gui.removeNode() self.newCloseButton = GuiButton.GuiButton( parent=self, relief=None, pos=(2.2999999999999998, 0, 1.0800000000000001), image=(generic_box, generic_box, generic_box_over, generic_box), image_scale=0.40000000000000002, command=self.closePanel) xButton = OnscreenImage(parent=self.newCloseButton, image=generic_x, scale=0.20000000000000001, pos=(-0.25600000000000001, 0, 0.76600000000000001)) gui = loader.loadModel('models/gui/toplevel_gui') buttonImage = (gui.find('**/generic_button'), gui.find('**/generic_button_down'), gui.find('**/generic_button_over'), gui.find('**/generic_button_disabled')) gui.removeNode() self.takeAllButton = DirectButton( parent=self, relief=None, image=buttonImage, image_scale=(0.26000000000000001, 1.0, 0.22), image0_color=VBase4(0.65000000000000002, 0.65000000000000002, 0.65000000000000002, 1), image1_color=VBase4(0.40000000000000002, 0.40000000000000002, 0.40000000000000002, 1), image2_color=VBase4(0.90000000000000002, 0.90000000000000002, 0.90000000000000002, 1), image3_color=VBase4(0.40999999999999998, 0.40000000000000002, 0.40000000000000002, 1), text=PLocalizer.InventoryPlunderTakeAll, text_font=PiratesGlobals.getPirateBoldOutlineFont(), text_align=TextNode.ACenter, text_pos=(0, -0.01), text_scale=PiratesGuiGlobals.TextScaleLarge, text_fg=PiratesGuiGlobals.TextFG2, text_shadow=PiratesGuiGlobals.TextShadow, pos=(1.05, 0, 0.074999999999999997), command=self.takeAllLoot) self.setBin('gui-fixed', -1) self.createScoreboard()