def OnEntrySelected(self, typeID): uix.Flush(self.sr.icon) typeIcon = uicontrols.Icon(parent=self.sr.icon, align=uiconst.TOPLEFT, pos=(0, 10, 64, 64), ignoreSize=True, typeID=typeID, size=64) text = evetypes.GetDescription(typeID) info = localization.GetByLabel('UI/InfrastructureHub/EntryDescription', item=typeID, description=text) self.sr.desc.SetValue(info)
def UpdateText(self): context = self.previewContainer.context if not hasattr(context, 'typeID'): return groupID = evetypes.GetGroupID(context.typeID) categoryID = evetypes.GetCategoryID(context.typeID) title = evetypes.GetName(context.typeID) if hasattr(context, 'itemID'): bp = sm.GetService('michelle').GetBallpark() if bp: slim = bp.GetInvItem(context.itemID) if slim: title = slim.name self.title.text = title subtitle = '' if categoryID != invconst.categoryApparel: scene = self.previewContainer.sceneContainer.scene model = first_or_default(getattr(scene, 'objects', []), None) if model: radius = round(model.GetBoundingSphereRadius() * 2, 0) if groupID in invconst.turretModuleGroups or groupID in invconst.turretAmmoGroups: subtitle = localization.GetByLabel( 'UI/Preview/ShipSubLabelNoRace', groupName=evetypes.GetGroupName(context.typeID), length=FmtDist(radius)) else: raceID = evetypes.GetRaceID(context.typeID) race = cfg.races.Get( raceID) if raceID in cfg.races else None if race is None: subtitle = localization.GetByLabel( 'UI/Preview/ShipSubLabelNoRace', groupName=evetypes.GetGroupName(context.typeID), length=FmtDist(radius)) else: raceName = localization.GetByMessageID(race.raceNameID) subtitle = localization.GetByLabel( 'UI/Preview/ShipSubLabel', raceName=raceName, groupName=evetypes.GetGroupName(context.typeID), length=FmtDist(radius)) self.subtitle.text = subtitle if categoryID == invconst.categoryApparel: self.descCont.Show() description = evetypes.GetDescription(context.typeID) or '' description = re.sub('<b>|</b>|\\r', '', description) description = re.sub('\\n', '<br>', description) self.desc.text = description
def GetScrollContent(self): entries = [] for product in self.jobData.products: data = KeyVal( typeID=product.typeID, label=evetypes.GetName(product.typeID), getIcon=True, isCopy=not product.original, hint=evetypes.GetDescription(product.typeID), isSelected=self.jobData.GetProductTypeID() == product.typeID, OnDblClick=self.OnNodeDblClick) entry = listentry.Get(decoClass=listentry.Item, data=data) entries.append(entry) entries = sorted(entries, key=lambda x: (x.typeID is not None, x.label)) return entries
def GetSkillToolTip(self, skillTypeID, level): if session.charid is None: return mySkill = self.GetSkill(skillTypeID) mySkillLevel = 0 if mySkill is not None: mySkillLevel = mySkill.skillLevel tooltipText = evetypes.GetDescription(skillTypeID) tooltipTextList = [] for i in xrange(int(mySkillLevel) + 1, int(level) + 1): timeLeft = self.GetRawTrainingTimeForSkillLevel(skillTypeID, i) tooltipTextList.append( localization.GetByLabel( 'UI/SkillQueue/Skills/SkillLevelAndTrainingTime', skillLevel=i, timeLeft=long(timeLeft))) levelsText = '<br>'.join(tooltipTextList) if levelsText: tooltipText += '<br><br>' + levelsText return tooltipText
def GetShipExposureTemplateData(self): if not eve.stationItem: return racialShips = { const.raceAmarr: [2006, 20183, 24696, 24692, 597, 1944, 624], const.raceCaldari: [621, 20185, 24698, 640, 602, 648, 623], const.raceGallente: [627, 20187, 24700, 641, 593, 650, 626], const.raceMinmatar: [629, 20189, 24702, 644, 587, 653, 622] } oreShipsList = [17478, 17476, 2998] racialIntroVideos = { const.raceAmarr: 'res:/video/cq/LOGO_AMARR.webm', const.raceCaldari: 'res:/video/cq/LOGO_CALDARI.webm', const.raceGallente: 'res:/video/cq/LOGO_GALLENTE.webm', const.raceMinmatar: 'res:/video/cq/LOGO_MINMATAR.webm' } data = util.KeyVal() if random.random() <= 0.3: data.introVideoPath = 'res:/video/cq/LOGO_ORE.webm' data.shipTypeID = random.choice(oreShipsList) else: stationRace = evetypes.GetRaceID(eve.stationItem.stationTypeID) if stationRace not in racialShips: stationRace = const.raceGallente data.introVideoPath = racialIntroVideos[stationRace] data.shipTypeID = random.choice(racialShips[stationRace]) data.shipName = evetypes.GetName(data.shipTypeID) data.shipGroupName = evetypes.GetGroupName(data.shipTypeID) data.buttonText = localization.GetByLabel( 'UI/Station/Holoscreen/Common/AvailableOnMarketNow') data.mainText = '<fontsize=30>' + localization.GetByLabel( 'UI/Station/Holoscreen/Ship/ShipDetailsTitle') data.mainText += '\n<fontsize=25>' + evetypes.GetDescription( data.shipTypeID) data.clickFunc = sm.GetService('marketutils').ShowMarketDetails data.clickArgs = (data.shipTypeID, None) data.clickFuncLabel = localization.GetByLabel( 'UI/Station/Holoscreen/Ship/OpenMarketForShip', ship=data.shipTypeID) return data
def GetDescription(self): return evetypes.GetDescription(self.blueprintTypeID)
def GetDescription(self): return evetypes.GetDescription(self.typeID)
def get_description(self): return evetypes.GetDescription(self._type_id)
def GetScrollContent(self): entries = [] for material in self.materialData.options: if material.typeID is None: data = KeyVal(label=localization.GetByLabel('UI/Industry/UseNoOptionalItem'), OnDblClick=self.OnNodeDblClick, typeID=None, height=29) entries.append(listentry.Get(decoClass=listentry.Generic, data=data)) else: data = KeyVal(typeID=material.typeID, label=evetypes.GetName(material.typeID), getIcon=True, hint=evetypes.GetDescription(material.typeID), isSelected=material.typeID == self.materialData.typeID, OnDblClick=self.OnNodeDblClick, isItemOwned=not material.missing) entry = listentry.Get(decoClass=OptionalMaterialEntry, data=data) entries.append(entry) entries = sorted(entries, key=lambda x: (x.typeID is not None, x.label)) return entries
def GetHint(self): return evetypes.GetDescription(self.skillID)
def GetHint(self): return evetypes.GetDescription(self.materialData.typeID)