def __init__(self, holder): pvpIcons = loader.loadModel('models/textureCards/pvp_arrow') self.holder = holder hasTeams = holder.hasTeams() self.borderOne = BorderFrame.BorderFrame(relief = None, frameSize = (-(PiratesGuiGlobals.PVPCompletePageWidth) * 0.33000000000000002, PiratesGuiGlobals.PVPCompletePageWidth * 0.33000000000000002, PiratesGuiGlobals.PVPCompletePageHeight * 0.5 - 0.10000000000000001 - (PiratesGuiGlobals.TMCompletePageHeight / 16.0) * len(holder.getItemList(1)), PiratesGuiGlobals.PVPCompletePageHeight * 0.5), modelName = 'pir_m_gui_frm_subframe', imageColorScale = VBase4(0.75, 0.75, 0.90000000000000002, 0.75)) self.borderOneSecondLayer = BorderFrame.BorderFrame(parent = self.borderOne, relief = None, text = '', text_scale = 0.074999999999999997, text_fg = PVPGlobals.getTeamColor(1), text_pos = (-0.65000000000000002, 0.64000000000000001), frameSize = (-(PiratesGuiGlobals.PVPCompletePageWidth) * 0.33000000000000002, PiratesGuiGlobals.PVPCompletePageWidth * 0.33000000000000002, PiratesGuiGlobals.PVPCompletePageHeight * 0.5 - 0.10000000000000001 - (PiratesGuiGlobals.TMCompletePageHeight / 16.0) * len(holder.getItemList(1)), PiratesGuiGlobals.PVPCompletePageHeight * 0.5), modelName = 'pir_m_gui_frm_subframe', imageColorScale = VBase4(0.75, 0.75, 0.90000000000000002, 0.75)) self.borderOne.setPos(0.0625, 0, -0.10000000000000001) if hasTeams: self.borderOneSecondLayer['text'] = PLocalizer.PVPTeamName % 1 self.one = ScoreFrame(PiratesGuiGlobals.PVPCompletePageWidth - 1.2, PiratesGuiGlobals.PVPCompletePageHeight, holder, 1, sortOrder = 2) self.one.setPos(-0.5, 0, -0.84999999999999998) else: self.one = ScoreFrame(PiratesGuiGlobals.PVPCompletePageWidth - 1.0, PiratesGuiGlobals.PVPCompletePageHeight, holder, 1, sortOrder = 2) self.one.setPos(-0.73999999999999999, 0, -0.84999999999999998) self.borderOne.hide() self.one.hide() if hasTeams: self.borderTwo = BorderFrame.BorderFrame(relief = None, frameSize = (-(PiratesGuiGlobals.PVPCompletePageWidth) * 0.33000000000000002, PiratesGuiGlobals.PVPCompletePageWidth * 0.33000000000000002, PiratesGuiGlobals.PVPCompletePageHeight * 0.5 - 0.10000000000000001 - (PiratesGuiGlobals.TMCompletePageHeight / 16.0) * len(holder.getItemList(2)), PiratesGuiGlobals.PVPCompletePageHeight * 0.5), modelName = 'pir_m_gui_frm_subframe', imageColorScale = VBase4(0.75, 0.75, 0.90000000000000002, 0.75)) self.borderTwoSecondLayer = BorderFrame.BorderFrame(parent = self.borderTwo, relief = None, text = PLocalizer.PVPTeamName % 2, text_scale = 0.074999999999999997, text_fg = PVPGlobals.getTeamColor(2), text_pos = (-0.65000000000000002, 0.64000000000000001), frameSize = (-(PiratesGuiGlobals.PVPCompletePageWidth) * 0.33000000000000002, PiratesGuiGlobals.PVPCompletePageWidth * 0.33000000000000002, PiratesGuiGlobals.PVPCompletePageHeight * 0.5 - 0.10000000000000001 - (PiratesGuiGlobals.TMCompletePageHeight / 16.0) * len(holder.getItemList(2)), PiratesGuiGlobals.PVPCompletePageHeight * 0.5), modelName = 'pir_m_gui_frm_subframe', imageColorScale = VBase4(0.75, 0.75, 0.90000000000000002, 0.75)) self.two = ScoreFrame(PiratesGuiGlobals.PVPCompletePageWidth - 1.2, PiratesGuiGlobals.PVPCompletePageHeight, holder, 2, sortOrder = 2) self.borderTwo.setPos(0.0625, 0, -0.25 - (PiratesGuiGlobals.TMCompletePageHeight / 16.0) * len(holder.getItemList(1))) self.two.setPos(-0.5, 0, -1.0 - (PiratesGuiGlobals.TMCompletePageHeight / 16.0) * len(holder.getItemList(1))) self.borderTwo.hide() self.two.hide() else: self.borderTwo = None self.two = None
def __init__(self, name, holder=None): w = PiratesGuiGlobals.PVPPanelWidth h = PiratesGuiGlobals.PVPPanelHeight BorderFrame.BorderFrame.__init__(self, relief=None, frameSize=(0.0, w, 0.0, h), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4( 0.75, 0.75, 0.90000000000000002, 0.75)) self.secondLayer = BorderFrame.BorderFrame( parent=self, relief=None, frameSize=(0.0, w, 0.0, h), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4(0.75, 0.75, 0.90000000000000002, 0.75)) self.initialiseoptions(PVPPanel) if holder: self['frameSize'] = ( 0.0, w, 0.0 - len(holder.getItemList()) * 0.050000000000000003, h) self.secondLayer['frameSize'] = ( 0.0, w, 0.0 - len(holder.getItemList()) * 0.050000000000000003, h) self.list = ListFrame(PiratesGuiGlobals.PVPPageWidth, None, name, holder, frameColor=(0, 0, 0, 0)) self.list.setup() self.list.reparentTo(self) self.list.setPos( 0.0050000000000000001, 0.20000000000000001, 0.0 - len(holder.getItemList()) * 0.050000000000000003) self.renownDisplay = None if base.config.GetBool('want-land-infamy', 0) and not (self.renownDisplay): self.renownDisplay = PVPRankGui.PVPRankGui( parent=base.a2dBottomRight, displayType=PVPRankGui.LAND_RENOWN_DISPLAY) self.renownDisplay.setPos(0.0, 0.0, 0.0) self.pvpTeamGraphic = None
def __init__(self): InventoryPage.InventoryPage.__init__(self) self.initialiseoptions(QuestPage) self.detailId = None self.titleBorder = BorderFrame.BorderFrame(parent=self, frameSize=(-0.02, 0.97, -0.02, 0.56)) self.titleBorder.setPos(0.065, 0, -0.01) self.titleBorder.background.setColor(0, 0, 0, 1) self.titleBorder.resetDecorations() self.titleList = QuestTitleList.QuestTitleList() self.titleList.reparentTo(self.titleBorder) self.titleList.setPos(0.005, 0, 0) self.detailFrame = QuestDetailGUI(parent=self, pos=(0.54, 0, 1.006)) self.dropButton = GuiButton.GuiButton(parent=self, state=DGG.DISABLED, text=PLocalizer.DropQuest, textMayChange=0, text_scale=PiratesGuiGlobals.TextScaleLarge, text_pos=(0, -0.014), pos=(0.91, 0, 0.605), image=GuiButton.GuiButton.redGenericButton, image_scale=0.6, command=self.dropQuest, helpText=PLocalizer.DropQuestHelp, helpDelay=PiratesGuiGlobals.HelpPopupTime, helpPos=(-0.335, 0, 0.125)) gui = loader.loadModel('models/gui/compass_main') objectiveGrey = gui.find('**/icon_objective_grey') self.trackButton = GuiButton.GuiButton(parent=self, state=DGG.DISABLED, text=PLocalizer.TrackQuest, textMayChange=0, text_pos=(0.035, -0.014), text_scale=PiratesGuiGlobals.TextScaleLarge, pos=(0.66, 0, 0.605), command=self.trackQuest, helpText=PLocalizer.TrackQuestHelp, helpDelay=PiratesGuiGlobals.HelpPopupTime, helpPos=(-0.08, 0, 0.125), image=GuiButton.GuiButton.redGenericButton, image_scale=0.6, geom=objectiveGrey, geom_color=Vec4(1, 1, 0, 1), geom_scale=0.2, geom_pos=(-0.07, 0, -0.002)) self.specialInfoPanel = {} self.specialButton = GuiButton.GuiButton(parent=self, state=DGG.NORMAL, text='', textMayChange=1, text_scale=PiratesGuiGlobals.TextScaleLarge, text_pos=(0, -0.014), pos=(0.17, 0, 0.605), image=GuiButton.GuiButton.redGenericButton, image_scale=0.6, command=self.showSpecialInfo, helpText=PLocalizer.DropQuestHelp, helpDelay=PiratesGuiGlobals.HelpPopupTime, helpPos=(-0.335, 0, 0.125)) self.specialButton.hide() self.accept('questGuiSelect', self.showQuestDetails) self.accept('localAvatarQuestComplete', self.updateQuestDetails) self.accept('localAvatarQuestUpdate', self.updateQuestDetails) self.accept('localAvatarQuestItemUpdate', self.updateQuestDetails) self.accept('inventoryAddDoId-%s-%s' % (localAvatar.getInventoryId(), InventoryCategory.QUESTS), self.updateQuestTitlesNewQuest) self.accept('inventoryRemoveDoId-%s-%s' % (localAvatar.getInventoryId(), InventoryCategory.QUESTS), self.updateQuestTitles) self.invRequest = None self.tmButtonQuick = None self.tmButtonSearch = None self.tmReadyDialog = None return
def __init__(self, parent=None, style=OTPDialog.NoButtons, giveMouse=True, **kw): self.style = style if not self.loadedAssets: buttons = loader.loadModel('models/gui/lookout_gui') self.checkButton = (buttons.find('**/lookout_submit'), buttons.find('**/lookout_submit_down'), buttons.find('**/lookout_submit_over')) self.cancelButton = (buttons.find('**/lookout_close_window'), buttons.find('**/lookout_close_window_down'), buttons.find('**/lookout_close_window_over')) for button in self.checkButton: button.setScale(0.2) button.flattenStrong() for button in self.cancelButton: button.setScale(0.2) button.flattenStrong() self.loadedAssets = True buttons.removeNode() if self.style == OTPDialog.TwoChoiceCustom: buttonImage = [ self.checkButton, self.cancelButton] buttonValue = [DGG.DIALOG_OK, DGG.DIALOG_CANCEL] if 'buttonText' in kw: buttonText = kw['buttonText'] del kw['buttonText'] else: buttonText = [ PLocalizer.DialogOK, PLocalizer.DialogCancel] elif self.style == OTPDialog.TwoChoice: buttonImage = [ self.checkButton, self.cancelButton] buttonText = [PLocalizer.DialogOK, PLocalizer.DialogCancel] buttonValue = [ DGG.DIALOG_OK, DGG.DIALOG_CANCEL] elif self.style == OTPDialog.YesNo: buttonImage = [ self.checkButton, self.cancelButton] buttonText = [PLocalizer.DialogYes, PLocalizer.DialogNo] buttonValue = [ DGG.DIALOG_OK, DGG.DIALOG_CANCEL] elif self.style == OTPDialog.Acknowledge: buttonImage = [ self.checkButton] buttonText = [PLocalizer.DialogOK] buttonValue = [DGG.DIALOG_OK] elif self.style == OTPDialog.CancelOnly: buttonImage = [ self.cancelButton] buttonText = [PLocalizer.DialogCancel] buttonValue = [DGG.DIALOG_CANCEL] elif self.style == OTPDialog.NoButtons: buttonImage = [] buttonText = [] buttonValue = [] else: self.notify.error('No such style as: ' + str(self.style)) self.borderFrame = BorderFrame.BorderFrame(borderScale=0.5) optiondefs = ( ( 'image', self.borderFrame, None), ('relief', None, None), ('buttonImageList', buttonImage, DGG.INITOPT), ('buttonTextList', buttonText, DGG.INITOPT), ('buttonValueList', buttonValue, DGG.INITOPT), ('buttonPadSF', 2.2, DGG.INITOPT), ('title_text', '', None), ('title_text_font', DGG.getDefaultFont(), None), ('title_text_wordwrap', 12, None), ('title_text_scale', PiratesGuiGlobals.TextScaleTitleSmall, None), ('title_text_fg', PiratesGuiGlobals.TextFG1, None), ('title_text_shadow', PiratesGuiGlobals.TextShadow, None), ('title_text_align', TextNode.ACenter, None), ('text_font', DGG.getDefaultFont(), None), ('text_wordwrap', 12, None), ('text_scale', PiratesGuiGlobals.TextScaleLarge, None), ('text_fg', PiratesGuiGlobals.TextFG1, None), ('text_shadow', PiratesGuiGlobals.TextShadow, None), ('text_align', TextNode.ALeft, None), ('button_pad', (0, 0), None), ('button_relief', None, None), ('button_text_pos', (0, -0.08), None), ('button_text_fg', PiratesGuiGlobals.TextFG1, None), ('button_text_shadow', PiratesGuiGlobals.TextShadow, None), ('button_text_scale', PiratesGuiGlobals.TextScaleLarge, None), ('fadeScreen', 0.5, None), ('image_color', (1, 1, 1, 1), None), ('destroyedCallback', None, None)) self.defineoptions(kw, optiondefs) DirectDialog.__init__(self, parent) def cleanupBorderFrame(): self.borderFrame.destroy() self.postInitialiseFuncList.append(cleanupBorderFrame) self.createcomponent('title', (), None, DirectLabel, (self,), relief=None, text_pos=(0, 0.16)) self.initialiseoptions(PDialog) self.setBin('gui-fixed', 1)
def __init__(self): InventoryPage.InventoryPage.__init__(self) self.initialiseoptions(TitlesPage) self.titles = [] self.selectedLandIndex = -1 self.selectedSeaIndex = -1 self.landButtons = [] self.seaButtons = [] self.forceInitLand = -1 self.forceInitSea = -1 self.loaded = 0 self.opened = 0 gui = loader.loadModel('models/gui/gui_main') scale = 0.33500000000000002 self.background = self.attachNewNode('background') self.background.setScale(scale) self.background.setPos(0.53000000000000003, 0, 0.73999999999999999) gui.find('**/gui_inv_red_general1').copyTo(self.background) PiratesGlobals.flattenOrdered(self.background) self.displayTitleFrame = DirectFrame( parent=self, relief=None, pos=(0.55000000000000004, 0, 1.175), text=PLocalizer.DisplayTitle, text_align=TextNode.ALeft, text_scale=0.044999999999999998, text_pos=(-0.45000000000000001, 0.050000000000000003), text_fg=PiratesGuiGlobals.TextFG2, text_wordwrap=20, text_shadow=(0, 0, 0, 1), textMayChange=1, text_font=PiratesGlobals.getInterfaceFont()) self.displayTitleLandFrame = BorderFrame.BorderFrame( parent=self, relief=None, pos=(0.81000000000000005, 0, 1.02), frameSize=(-0.050000000000000003, 0.050000000000000003, -0.26000000000000001, -0.080000000000000002), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4(0.75, 0.75, 0.90000000000000002, 0.75), text=PLocalizer.DisplayTitleLand, text_align=TextNode.ACenter, text_scale=0.032000000000000001, text_pos=(0, -0.01), text_fg=PiratesGuiGlobals.TextFG2, text_wordwrap=15, text_shadow=(0, 0, 0, 1), textMayChange=0, text_font=PiratesGlobals.getInterfaceFont()) self.displayTitleSeaFrame = BorderFrame.BorderFrame( parent=self, relief=None, pos=(0.96999999999999997, 0, 1.02), frameSize=(-0.050000000000000003, 0.050000000000000003, -0.26000000000000001, -0.080000000000000002), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4(0.75, 0.75, 0.90000000000000002, 0.75), text=PLocalizer.DisplayTitleSea, text_align=TextNode.ACenter, text_scale=0.032000000000000001, text_pos=(0, -0.01), text_fg=PiratesGuiGlobals.TextFG2, text_wordwrap=15, text_shadow=(0, 0, 0, 1), textMayChange=0, text_font=PiratesGlobals.getInterfaceFont()) self.dummyFrame = DirectFrame(parent=self, relief=None, pos=(0.10000000000000001, 0, 0.89000000000000001)) self.accept('LocalAvatarInfamyUpdated', self.refresh) self.accept('landBadgeSet', self.updateLandBadge) self.accept('seaBadgeSet', self.updateSeaBadge)
def __init__(self, parent, titleId, position, panelIndex, titlesPage, defaultOnLand=0, defaultOnSea=0): DirectFrame.__init__(self, parent, pos=position) self.iconModel = loader.loadModel(TitleGlobals.getModelPath(titleId)) tempModel = loader.loadModel('models/textureCards/skillIcons') self.titleId = titleId self.rank = 1 self.maxRank = 1 self.expPoints = 241 self.expBase = 150 self.expTarget = 400 self.landActive = defaultOnLand self.seaActive = defaultOnSea self.panelIndex = panelIndex self.titlesPage = titlesPage self.booleanTitle = TitleGlobals.isBooleanTitle(self.titleId) topgui = loader.loadModel('models/gui/toplevel_gui') self.titleNameFrame = BorderFrame.BorderFrame( parent=self, relief=None, pos=(0.12, 0, 0.01), frameSize=(-0.14999999999999999, 0.5, -0.14999999999999999, 0.029999999999999999), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4(0.75, 0.75, 0.90000000000000002, 0.75), text=TitleGlobals.getTitleRankName(self.titleId, self.expPoints), text_align=TextNode.ALeft, text_scale=0.035000000000000003, text_pos=(0, -0.02), text_fg=PiratesGuiGlobals.TextFG1, text_wordwrap=15, text_shadow=(0, 0, 0, 1), textMayChange=1, text_font=PiratesGlobals.getInterfaceFont()) self.titleDescFrame = DirectFrame( parent=self, relief=None, pos=(0.125, 0, -0.095000000000000001), text=TitleGlobals.getTitleDesc(self.titleId), text_align=TextNode.ALeft, text_scale=0.029999999999999999, text_pos=(0, -0.01), text_fg=PiratesGuiGlobals.TextFG2, text_wordwrap=15, text_shadow=(0, 0, 0, 1), textMayChange=0, text_font=PiratesGlobals.getInterfaceFont()) shipcard = loader.loadModel('models/gui/ship_battle') tex = shipcard.find('**/ship_battle_speed_bar*') self.expFrame = DirectFrame(parent=self, pos=(0.35999999999999999, 0, -0.050000000000000003), relief=None, image=tex, image_scale=(0.23000000000000001, 1, 0.5), scale=(1.48, 1, 1.2)) self.expMeter = DirectWaitBar( parent=self.expFrame, relief=DGG.RAISED, borderWidth=(0.0040000000000000001, 0.0040000000000000001), range=100, value=50, frameColor=(0, 0, 0, 0), barColor=(223 / 255.0, 137 / 255.0, 28 / 255.0, 1), frameSize=(-0.222, 0.084000000000000005, -0.012, 0.012), pos=(0.069000000000000006, 0, 0.0)) self.expMeterText = DirectFrame( parent=self, relief=None, pos=(0.59999999999999998, 0, 0.0), text='%s / %s' % (self.expBase, self.expTarget), text_align=TextNode.ARight, text_scale=0.029999999999999999, text_pos=(0, -0.01), text_fg=PiratesGuiGlobals.TextFG2, text_wordwrap=15, text_shadow=(0, 0, 0, 1), textMayChange=1, text_font=PiratesGlobals.getInterfaceFont()) if self.booleanTitle: self.expFrame.hide() self.expMeterText.hide() imgScale = TitleGlobals.getScale(self.titleId) self.iconFrame = GuiButton.GuiButton( parent=self, pos=(0.040000000000000001, 0, -0.050000000000000003), helpText=TitleGlobals.getTitleName(self.titleId), helpPos=(-0.26000000000000001, 0, 0.080000000000000002), relief=None, image=self.iconModel.find( '**/' + TitleGlobals.getIconName(self.titleId, 1)), image_scale=(0.14999999999999999 * imgScale, 1, 0.14999999999999999 * imgScale)) self.landButton = DirectButton.DirectButton( parent=self, pos=(0.70999999999999996, 0, -0.050000000000000003), relief=None, scale=0.22, image_color=VBase4(0.75, 0.84999999999999998, 1.0, 1.0), image=(topgui.find('**/pir_t_gui_frm_base_circle_over'), topgui.find('**/pir_t_gui_frm_base_circle'), topgui.find('**/pir_t_gui_frm_base_circle_over'), topgui.find('**/pir_t_gui_frm_base_circle')), command=self.selectLandBadge, extraArgs=[self.panelIndex]) self.titlesPage.landButtons.append(self.landButton) self.seaButton = DirectButton.DirectButton( parent=self, pos=(0.87, 0, -0.050000000000000003), relief=None, scale=0.22, image_color=VBase4(0.75, 0.84999999999999998, 1.0, 1.0), image=(topgui.find('**/pir_t_gui_frm_base_circle_over'), topgui.find('**/pir_t_gui_frm_base_circle'), topgui.find('**/pir_t_gui_frm_base_circle_over'), topgui.find('**/pir_t_gui_frm_base_circle')), command=self.selectSeaBadge, extraArgs=[self.panelIndex]) self.titlesPage.seaButtons.append(self.seaButton)
def __init__(self, holder): pvpIcons = loader.loadModel('models/textureCards/pvp_arrow') self.holder = holder self.borderOne = BorderFrame.BorderFrame( relief=None, frameSize=(-PiratesGuiGlobals.ScorePanelWidth * 0.4, PiratesGuiGlobals.ScorePanelWidth * 0.5, PiratesGuiGlobals.ScorePanelHeight * 0.5 - 0.2, PiratesGuiGlobals.ScorePanelHeight * 0.5), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4(0.75, 0.75, 0.9, 0.75)) self.borderOneSecondLayer = BorderFrame.BorderFrame( parent=self.borderOne, relief=None, frameSize=(-PiratesGuiGlobals.ScorePanelWidth * 0.4, PiratesGuiGlobals.ScorePanelWidth * 0.5, PiratesGuiGlobals.ScorePanelHeight * 0.5 - 0.2, PiratesGuiGlobals.ScorePanelHeight * 0.5), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4(0.75, 0.75, 0.9, 0.75)) iconOne = DirectFrame( parent=self.borderOne, relief=None, image=pvpIcons.find('**/pir_t_gui_frm_pvpFrench'), image_scale=0.2, image_pos=(-PiratesGuiGlobals.ScorePanelWidth * 0.35, 0, PiratesGuiGlobals.ScorePanelHeight * 0.45)) self.one = ScoreFrame(PiratesGuiGlobals.ScorePanelWidth - 0.2, PiratesGuiGlobals.ScorePanelHeight, holder, 1, sortOrder=2) self.borderOne.setPos(-0.625, 0, -0.3) self.one.setPos(-1.05, 0, -1.1) self.borderOne.hide() self.one.hide() self.borderTwo = BorderFrame.BorderFrame( relief=None, frameSize=(-PiratesGuiGlobals.ScorePanelWidth * 0.4, PiratesGuiGlobals.ScorePanelWidth * 0.5, PiratesGuiGlobals.ScorePanelHeight * 0.5 - 0.2, PiratesGuiGlobals.ScorePanelHeight * 0.5), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4(0.75, 0.75, 0.9, 0.75)) self.borderTwoSecondLayer = BorderFrame.BorderFrame( parent=self.borderTwo, relief=None, frameSize=(-PiratesGuiGlobals.ScorePanelWidth * 0.4, PiratesGuiGlobals.ScorePanelWidth * 0.5, PiratesGuiGlobals.ScorePanelHeight * 0.5 - 0.2, PiratesGuiGlobals.ScorePanelHeight * 0.5), modelName='pir_m_gui_frm_subframe', imageColorScale=VBase4(0.75, 0.75, 0.9, 0.75)) self.borderTwo.setPos( -0.625 + PiratesGuiGlobals.ScorePanelWidth + 0.01, 0, -0.3) iconTwo = DirectFrame( parent=self.borderTwo, relief=None, image=pvpIcons.find('**/pir_t_gui_frm_pvpSpanish'), image_scale=0.2, image_pos=(-PiratesGuiGlobals.ScorePanelWidth * 0.35, 0, PiratesGuiGlobals.ScorePanelHeight * 0.45)) self.two = ScoreFrame(PiratesGuiGlobals.ScorePanelWidth - 0.2, PiratesGuiGlobals.ScorePanelHeight, holder, 2, sortOrder=2) self.two.setPos(-1.05 + PiratesGuiGlobals.ScorePanelWidth + 0.01, 0, -1.1) self.borderTwo.hide() self.two.hide() self.accept(self.holder.getItemChangeMsg(), self._updateBorders) return