def _getFullCompleteStatusFields(self): quest = self.event statusTooltipData = {'tooltip': makeTooltip(header=TOOLTIPS.PERSONALMISSIONS_STATUS_FULLDONE_HEADER, body=TOOLTIPS.PERSONALMISSIONS_STATUS_FULLDONE_BODY)} statusLabel = text_styles.bonusAppliedText(icons.makeImageTag(RES_ICONS.MAPS_ICONS_LIBRARY_DOUBLECHECKMARK, vSpace=-2) + ' ' + _ms(QUESTS.PERSONALMISSION_STATUS_FULLDONE)) bottomStatusText = '' if quest.isDone(): bottomStatusText = text_styles.missionStatusAvailable(QUESTS.PERSONALMISSION_BOTTOMSTATUS_ALLAWARDSRECEIVED) return {'statusLabel': statusLabel, 'status': MISSIONS_STATES.FULL_COMPLETED, 'statusTooltipData': statusTooltipData, 'bottomStatusText': bottomStatusText}
def _getFullCompleteStatusFields(self): quest = self.event statusTooltipData = {'tooltip': makeTooltip(header=TOOLTIPS.PERSONALMISSIONS_STATUS_FULLDONE_HEADER, body=TOOLTIPS.PERSONALMISSIONS_STATUS_FULLDONE_BODY)} statusLabel = text_styles.bonusAppliedText(QUESTS.PERSONALMISSION_STATUS_FULLDONE) bottomStatusText = '' if quest.isDone(): bottomStatusText = text_styles.missionStatusAvailable(QUESTS.PERSONALMISSION_BOTTOMSTATUS_ALLAWARDSRECEIVED) showIcon = False return {'showIcon': showIcon, 'statusLabel': statusLabel, 'status': MISSIONS_STATES.FULL_COMPLETED, 'statusTooltipData': statusTooltipData, 'bottomStatusText': bottomStatusText}
def _getCompleteStatusFields(self, isLimited, bonusCount, bonusLimit): """ Gets status fields data for completed mission state. Data used in detailed mission view to display its completed state. For completed daily quests return unavailable state fields. """ statusTooltipData = None dateLabel = self._getActiveTimeDateLabel() resetDateLabel = '' status = EVENT_STATUS.COMPLETED if isLimited and bonusLimit > 1: statusLabel = text_styles.bonusAppliedText( _ms(QUESTS.MISSIONDETAILS_MISSIONSCOMPLETE, count=text_styles.bonusAppliedText(bonusCount), total=text_styles.standard(bonusLimit))) statusTooltipData = getCompletetBonusLimitTooltip() else: progressDesc = text_styles.success(_ms(QUESTS.QUESTS_STATUS_DONE)) icon = icons.makeImageTag(RES_ICONS.MAPS_ICONS_LIBRARY_OKICON, 16, 16, -2, 8) statusLabel = text_styles.concatStylesToSingleLine( icon, progressDesc) if self.event.bonusCond.isDaily(): status = EVENT_STATUS.NOT_AVAILABLE dateLabel = text_styles.concatStylesWithSpace( icons.makeImageTag(RES_ICONS.MAPS_ICONS_LIBRARY_TIMERICON, 16, 16, -2, 8), text_styles.error(QUESTS.MISSIONDETAILS_STATUS_NOTAVAILABLE), self._getCompleteDailyStatus( QUESTS.MISSIONDETAILS_STATUS_COMPLETED_DAILY)) resetDateLabel = self._getDailyResetStatusLabel() return { 'statusLabel': statusLabel, 'dateLabel': dateLabel, 'status': status, 'bottomStatusText': text_styles.concatStylesWithSpace( icons.makeImageTag(RES_ICONS.MAPS_ICONS_LIBRARY_DONE, 32, 32, -8), text_styles.missionStatusAvailable( QUESTS.MISSIONDETAILS_BOTTOMSTATUSCOMPLETE)), 'statusTooltipData': statusTooltipData, 'resetDateLabel': resetDateLabel }
def _getBodyData(self): cardsList = [] for e in self._events: eventID = e.getID() if eventID in self._cachedInfo: missionData = self._cachedInfo[eventID] else: missionData = getMissionInfoData(e) self._cachedInfo[eventID] = missionData cardsList.append(missionData.getInfo()) isPremEnabled = self.__isPremiumEnabled() isAllCompleted = self._completedQuestsCount == self._totalQuestsCount timeStr = self.__getDailyResetStatus() completeTitle = text_styles.missionStatusAvailable(backport.text(R.strings.quests.premiumQuests.body.complete(), time=timeStr) if isAllCompleted else '') return {'missions': cardsList, 'title': text_styles.promoTitle(QUESTS.PREMIUMQUESTS_BODY_TITLE), 'description': text_styles.highlightText(QUESTS.PREMIUMQUESTS_BODY_DESCRIPTION), 'buttonDetails': QUESTS.PREMIUMQUESTS_BODY_BUTTONDETAILS, 'icon': backport.image(R.images.gui.maps.icons.premacc.icons.premium_256x242()), 'hasPremium': isPremEnabled, 'completeTitle': completeTitle, 'uiDecoration': backport.image(R.images.gui.maps.icons.premacc.quests.background())}