def createNewItem(self, item, parent, itemType=None, columnWidths=[], color=None): newItem = ButtonListItem(item, 0.08, 0.38, parent, parentList=self, txtColor=color, pressEffect=False, image=GuiButton.GuiButton.genericButton, frameColor=(0, 0, 0, 0), textScale=0.05) newItem.setup() return newItem
def createNewItem(self, item, parent, itemType = None, columnWidths = [], color = None): if self.parentPanel.UI_VERSION == 0: newItem = ButtonListItem(item, 0.080000000000000002, 0.75, parent, parentList = self, txtColor = color, pressEffect = False, frameColor = (0, 0, 0, 0)) else: newItem = LookoutListItem(item, self.parentPanel.TOPLEVEL_GUI_FILE, 0.16, 0.75, parent, parentList = self, txtColor = color, pressEffect = False, frameColor = (0, 0, 0, 0), wantFrame = True) if self.parentPanel.invited == None: def gotOptions(itemList): if itemList and len(itemList) > 0: parentInfo = { 'parent': newItem, 'pos': (0.67500000000000004, 0, 0.105), 'scale': 0.17999999999999999 } self.createOptionsButton(parentInfo = parentInfo) self.determineLvl3ItemList(newItem, gotOptions) newItem.setup() if item['Value'] == PiratesGlobals.CREW_STYLE_FIND_A_CREW: if localAvatar.guiMgr.crewHUD.crew and localAvatar.guiMgr.crewHUD.startACrewState or localAvatar.guiMgr.crewHUD.joinACrewStatusPVP: newItem['state'] = DGG.DISABLED newItem.title['text_fg'] = PiratesGuiGlobals.TextFG9 newItem.desc['text_fg'] = PiratesGuiGlobals.TextFG9 if item['Value'] == PiratesGlobals.CREW_STYLE_RECRUIT_MEMBERS: if not (localAvatar.guiMgr.crewHUD.crew) or DistributedBandMember.DistributedBandMember.IsLocalAvatarHeadOfBand() == 0: newItem['state'] = DGG.DISABLED newItem.title['text_fg'] = PiratesGuiGlobals.TextFG9 newItem.desc['text_fg'] = PiratesGuiGlobals.TextFG9 if localAvatar.guiMgr.crewHUD.startACrewState: newItem['state'] = DGG.NORMAL newItem.title['text_fg'] = PiratesGuiGlobals.TextFG1 newItem.desc['text_fg'] = PiratesGuiGlobals.TextFG1 if item['Value'] == PiratesGlobals.CREW_STYLE_FIND_A_PVP_CREW: if localAvatar.guiMgr.crewHUD.crew and localAvatar.guiMgr.crewHUD.startACrewState or localAvatar.guiMgr.crewHUD.joinACrewStatus: newItem['state'] = DGG.DISABLED newItem.title['text_fg'] = PiratesGuiGlobals.TextFG9 newItem.desc['text_fg'] = PiratesGuiGlobals.TextFG9 if item['Value'] == PiratesGlobals.GAME_STYLE_TM_BLACK_PEARL: newItem.title['text_scale'] = PiratesGuiGlobals.TextScaleTitleSmall return newItem