Exemple #1
0
 def _getHint(self):
     if self.__hintInQueue is CommandMapping.CMD_SHOW_HELP:
         keyName = getReadableKey(CommandMapping.CMD_SHOW_HELP)
         pressText = backport.text(
             R.strings.ingame_gui.helpScreen.hint.press())
         hintText = backport.text(
             R.strings.ingame_gui.helpScreen.hint.description())
         return HintData(keyName, pressText, hintText, 0, 0,
                         HintPriority.HELP)
     if self.__hintInQueue is CommandMapping.CMD_CHAT_SHORTCUT_CONTEXT_COMMAND:
         keyName = getReadableKey(
             CommandMapping.CMD_CHAT_SHORTCUT_CONTEXT_COMMAND)
         pressText = backport.text(
             R.strings.ingame_gui.battleCommunication.hint.press())
         hintText = backport.text(
             R.strings.ingame_gui.battleCommunication.hint.description())
         return HintData(keyName, pressText, hintText, 0, 0,
                         HintPriority.BATTLE_COMMUNICATION)
     if self.__hintInQueue is CommandMapping.CMD_QUEST_PROGRESS_SHOW:
         if self.lobbyContext.getServerSettings().isPersonalMissionsEnabled(
         ):
             keyName = getReadableKey(
                 CommandMapping.CMD_QUEST_PROGRESS_SHOW)
             pressText = ''
             hintText = backport.text(
                 R.strings.ingame_gui.battleProgress.hint.noBindingKey())
             if keyName:
                 pressText = backport.text(
                     R.strings.ingame_gui.battleProgress.hint.press())
                 hintText = backport.text(
                     R.strings.ingame_gui.battleProgress.hint.description())
             return HintData(keyName, pressText, hintText, 0, 0,
                             HintPriority.QUESTS)
Exemple #2
0
def buildDualGunPages(headerTitle):
    pages = []
    shootKey = getReadableKey(CommandMapping.CMD_CM_SHOOT)
    chargeKey = getReadableKey(CommandMapping.CMD_CM_CHARGE_SHOT)
    _addPage(
        pages, headerTitle,
        backport.text(
            R.strings.ingame_help.detailsHelp.dualGun.volley_fire.title()),
        text_styles.mainBig(
            backport.text(
                R.strings.ingame_help.detailsHelp.dualGun.volley_fire())),
        [chargeKey],
        backport.image(
            R.images.gui.maps.icons.battleHelp.dualGunHelp.volley_fire()))
    _addPage(
        pages, headerTitle,
        backport.text(
            R.strings.ingame_help.detailsHelp.dualGun.quick_fire.title()),
        text_styles.mainBig(
            backport.text(
                R.strings.ingame_help.detailsHelp.dualGun.quick_fire())),
        [shootKey],
        backport.image(
            R.images.gui.maps.icons.battleHelp.dualGunHelp.quick_fire()))
    return pages
 def __onMappingChanged(self, *args):
     msg = ''
     if self.__isPMBattleProgressEnabled and not self.__isRankedBattle:
         msg = backport.text(R.strings.prebattle.battleProgress.hint(),
                             hintKey=getReadableKey(
                                 CommandMapping.CMD_QUEST_PROGRESS_SHOW))
     if msg:
         self.as_setInfoHintS(msg)
Exemple #4
0
 def __getHint(self):
     keyName = getReadableKey(CommandMapping.CMD_CM_VEHICLE_SWITCH_AUTOROTATION)
     if keyName:
         pressText = text_styles.tutorial(INGAME_GUI.SIEGEMODE_HINT_PRESS)
         hintText = text_styles.tutorial(INGAME_GUI.siegeModeHint(self._siegeState))
         keyText = makeHtmlString('html_templates:battle/siegeMode', 'toggle', ctx={'key': keyName})
         return (keyText, pressText, hintText)
     return ('', '', text_styles.tutorial(INGAME_GUI.SIEGEMODE_HINT_NOBINDING))
 def _getHint(self):
     keyName = getReadableKey(CommandMapping.CMD_VOICECHAT_ENABLE)
     key = getVirtualKey(CommandMapping.CMD_VOICECHAT_ENABLE)
     hintTextLeft = backport.text(
         R.strings.ingame_gui.dynamicSquad.hint.voipToggleKeyLeft())
     hintTextRight = backport.text(
         R.strings.ingame_gui.dynamicSquad.hint.voipToggleKeyRight())
     return HintData(key, keyName, hintTextLeft, hintTextRight, 0, 0,
                     HintPriority.DYN_SQUAD, False)
 def _getHint(self):
     keyName = getReadableKey(CommandMapping.CMD_QUEST_PROGRESS_SHOW)
     pressText = ''
     if keyName:
         pressText = INGAME_GUI.BATTLEPROGRESS_HINT_PRESS
         hintText = INGAME_GUI.BATTLEPROGRESS_HINT_DESCRIPTION
     else:
         hintText = INGAME_GUI.BATTLEPROGRESS_HINT_NOBINDINGKEY
     return HintData(keyName, pressText, hintText, 0, 0, HintPriority.QUESTS)
 def _getHint(self):
     keyName = getReadableKey(CommandMapping.CMD_CM_VEHICLE_SWITCH_AUTOROTATION)
     pressText = ''
     if keyName:
         pressText = INGAME_GUI.SIEGEMODE_HINT_PRESS
         hintText = INGAME_GUI.siegeModeHint(self.__siegeState)
     else:
         hintText = INGAME_GUI.SIEGEMODE_HINT_NOBINDING
     return HintData(keyName, pressText, hintText, 0, 0, HintPriority.SIEGE)
 def _getHint(self):
     hintTextLeft = ''
     keyName = getReadableKey(CommandMapping.CMD_CM_TRAJECTORY_VIEW)
     if keyName:
         hintTextLeft = i18n.makeString(INGAME_GUI.TRAJECTORYVIEW_HINT_ALTERNATEMODELEFT)
         hintTextRight = i18n.makeString(INGAME_GUI.TRAJECTORYVIEW_HINT_ALTERNATEMODERIGHT)
     else:
         hintTextRight = i18n.makeString(INGAME_GUI.TRAJECTORYVIEW_HINT_NOBINDINGKEY)
     return HintData(keyName, hintTextLeft, hintTextRight, _TRAJECTORY_VIEW_HINT_POSITION[0], _TRAJECTORY_VIEW_HINT_POSITION[1], HintPriority.TRAJECTORY)
Exemple #9
0
def buildBurnoutPages():
    pages = []
    breakeKeyName = getReadableKey(CommandMapping.CMD_BLOCK_TRACKS)
    forwardKeyName = getReadableKey(CommandMapping.CMD_MOVE_FORWARD)
    keyName1 = breakeKeyName if breakeKeyName else backport.text(
        R.strings.ingame_help.detailsHelp.noKey())
    keyName2 = forwardKeyName if forwardKeyName else backport.text(
        R.strings.ingame_help.detailsHelp.noKey())
    _addPage(
        pages,
        backport.text(
            R.strings.ingame_help.detailsHelp.wheeledVeh.burnout.title()),
        backport.text(R.strings.ingame_help.detailsHelp.wheeledVeh.burnout(),
                      key1=keyName1,
                      key2=keyName2), [forwardKeyName, breakeKeyName],
        backport.image(
            R.images.gui.maps.icons.battleHelp.wheeledHelp.wheel_burnout()))
    return pages
Exemple #10
0
 def __canShowHint(self):
     if self.__isObserver or self.sessionProvider.isReplayPlaying or self.__wasDisplayed or self.__areOtherIndicatorsShown():
         return False
     voipMgr = VOIP.getVOIPManager()
     if voipMgr:
         if not voipMgr.isVoiceSupported():
             return False
     keyName = getReadableKey(CommandMapping.CMD_VOICECHAT_ENABLE)
     return False if not keyName else self._haveHintsLeft(self.__settings)
Exemple #11
0
 def _getHint(self):
     keyName = getReadableKey(CommandMapping.CMD_CM_VEHICLE_ACTIVATE_RADAR)
     pressText = ''
     if keyName:
         pressText = backport.text(
             R.strings.battle_royale.radar.hint.press())
         hintText = backport.text(R.strings.battle_royale.radar.hint.text())
     else:
         hintText = backport.text(
             R.strings.battle_royale.radar.hint.noBinding())
     return HintData(keyName, pressText, hintText, 0, 0, HintPriority.RADAR)
Exemple #12
0
 def __getHint():
     hintTextLeft = None
     keyName = getReadableKey(CommandMapping.CMD_CM_TRAJECTORY_VIEW)
     if keyName is not '':
         hintTextLeft = i18n.makeString(
             INGAME_GUI.TRAJECTORYVIEW_HINT_ALTERNATEMODELEFT)
         hintTextRight = i18n.makeString(
             INGAME_GUI.TRAJECTORYVIEW_HINT_ALTERNATEMODERIGHT)
     else:
         hintTextRight = i18n.makeString(
             INGAME_GUI.TRAJECTORYVIEW_HINT_NOBINDINGKEY)
     return (keyName, hintTextLeft, hintTextRight,
             _TRAJECTORY_VIEW_HINT_POSITION[0],
             _TRAJECTORY_VIEW_HINT_POSITION[1])
Exemple #13
0
def buildSiegeModePages():
    pages = []
    siegeKeyName = getReadableKey(
        CommandMapping.CMD_CM_VEHICLE_SWITCH_AUTOROTATION)
    keyName = siegeKeyName if siegeKeyName else backport.text(
        R.strings.ingame_help.detailsHelp.noKey())
    _addPage(
        pages,
        backport.text(
            R.strings.ingame_help.detailsHelp.wheeledVeh.twoModes.title()),
        backport.text(R.strings.ingame_help.detailsHelp.wheeledVeh.twoModes(),
                      key1=keyName), [siegeKeyName],
        backport.image(
            R.images.gui.maps.icons.battleHelp.wheeledHelp.wheel_two_mode()))
    return pages
Exemple #14
0
 def setShowData(self, senderVehicleID, cmdName):
     vInfoVO = self.sessionProvider.getArenaDP().getVehicleInfo(senderVehicleID)
     if not vInfoVO:
         return
     vehicleTypeImg = _VEHICLE_CLASS_TAGS_ICONS[vInfoVO.vehicleType.classTag]
     vehName = vInfoVO.vehicleType.shortNameWithPrefix
     pressText = backport.text(R.strings.ingame_gui.quickReply.hint.press())
     if cmdName == BATTLE_CHAT_COMMAND_NAMES.HELPME:
         hintText = backport.text(R.strings.ingame_gui.quickReply.hint.toHelp())
     elif cmdName == BATTLE_CHAT_COMMAND_NAMES.SUPPORTING_ALLY:
         hintText = backport.text(R.strings.ingame_gui.quickReply.hint.toThank())
     else:
         hintText = backport.text(R.strings.ingame_gui.quickReply.hint.toAcknowledge())
     keyName = getReadableKey(CommandMapping.CMD_RADIAL_MENU_SHOW)
     self.as_setDataS(cmdName, vehicleTypeImg, vehName, pressText, hintText, keyName)
Exemple #15
0
 def _getHint(self):
     hintTextLeft = ''
     keyName = getReadableKey(CommandMapping.CMD_CM_TRAJECTORY_VIEW)
     if keyName:
         hintTextLeft = backport.text(
             R.strings.ingame_gui.trajectoryView.hint.alternateModeLeft())
         hintTextRight = backport.text(
             R.strings.ingame_gui.trajectoryView.hint.alternateModeRight())
     else:
         hintTextRight = backport.text(
             R.strings.ingame_gui.trajectoryView.hint.noBindingKey())
     return HintData(keyName, hintTextLeft, hintTextRight,
                     _TRAJECTORY_VIEW_HINT_POSITION[0],
                     _TRAJECTORY_VIEW_HINT_POSITION[1],
                     HintPriority.TRAJECTORY)
Exemple #16
0
 def __getHint(self):
     keyName = getReadableKey(
         CommandMapping.CMD_CM_VEHICLE_SWITCH_AUTOROTATION)
     hint = INGAME_GUI.siegeModeHint(self._siegeState)
     if keyName:
         return makeHtmlString('html_templates:battle/siegeMode',
                               'toggle',
                               ctx={
                                   'key': i18n.makeString(keyName),
                                   'text': i18n.makeString(hint)
                               })
     else:
         return makeHtmlString('html_templates:battle/siegeMode',
                               'noBinding',
                               ctx={
                                   'text':
                                   i18n.makeString(
                                       INGAME_GUI.SIEGEMODE_HINT_NOBINDING)
                               })
 def _populate(self):
     super(RecoveryPanel, self)._populate()
     ctrl = self.sessionProvider.shared.feedback
     if ctrl is not None:
         ctrl.onVehicleFeedbackReceived += self.__onVehicleFeedbackReceived
     g_playerEvents.onRoundFinished += self.__onRoundFinished
     self.as_setupTextsS(
         i18n.makeString(INGAME_GUI.RECOVERY_HINT1),
         i18n.makeString(INGAME_GUI.RECOVERY_HINT2),
         getReadableKey(CommandMapping.CMD_REQUEST_RECOVERY))
     if avatar_getter.getLastRecoveryArgs() is not None:
         activated, state, timerDuration, endOfTimer = avatar_getter.getLastRecoveryArgs(
         )
         if state > RM_STATE.NOT_RECOVERING:
             self.__onVehicleFeedbackReceived(
                 _EVENT_ID.VEHICLE_RECOVERY_STATE_UPDATE,
                 avatar_getter.getPlayerVehicleID(),
                 (activated, state, timerDuration, endOfTimer))
     return
Exemple #18
0
 def _getHint(self):
     keyName = getReadableKey(
         CommandMapping.CMD_CM_VEHICLE_SWITCH_AUTOROTATION)
     pressText = ''
     if keyName:
         pressText = backport.text(
             R.strings.ingame_gui.siegeMode.hint.press())
         if self.__isWheeledTech:
             hintText = backport.text(
                 R.strings.ingame_gui.siegeMode.hint.wheeled())
         elif self.__hasTurboshaftEngine:
             hintText = backport.text(
                 R.strings.ingame_gui.siegeMode.hint.turboshaftEngine())
         else:
             hintTextID = R.strings.ingame_gui.siegeMode.hint.forMode.dyn(
                 attr='c_{}'.format(self.__siegeState))
             hintText = backport.text(
                 hintTextID()) if hintTextID.exists() else None
     else:
         hintText = backport.text(
             R.strings.ingame_gui.siegeMode.hint.noBinding())
     return HintData(keyName, pressText, hintText, 0, 0, HintPriority.SIEGE)
 def getQuestFullData(self):
     selectedQuest = self.__selectedQuest
     if selectedQuest:
         formatter = self.__getFormatter(selectedQuest)
         return {
             'questName':
             selectedQuest.getUserName(),
             'questID':
             selectedQuest.getID(),
             'questIndexStr':
             str(selectedQuest.getInternalID()),
             'questIcon':
             RES_ICONS.getAllianceGoldIcon(selectedQuest.getMajorTag()),
             'questHint':
             _ms(PREBATTLE.BATTLEPROGRESS_HINT,
                 hintKey=getReadableKey(
                     CommandMapping.CMD_QUEST_PROGRESS_SHOW)),
             'headerProgress':
             formatter.headerFormat(),
             'bodyProgress':
             formatter.bodyFormat()
         }
     return {}
Exemple #20
0
def buildTurboshaftEnginePages():
    pages = []
    siegeKeyName = getReadableKey(
        CommandMapping.CMD_CM_VEHICLE_SWITCH_AUTOROTATION)
    _addPage(
        pages,
        backport.text(R.strings.ingame_help.detailsHelp.engineMode.
                      engineModePage1.title()),
        backport.text(
            R.strings.ingame_help.detailsHelp.engineMode.engineModePage1()),
        [siegeKeyName],
        backport.image(R.images.gui.maps.icons.battleHelp.turboshaftEngineHelp.
                       engine_mode_page_1()))
    _addPage(
        pages,
        backport.text(R.strings.ingame_help.detailsHelp.engineMode.
                      engineModePage2.title()),
        backport.text(
            R.strings.ingame_help.detailsHelp.engineMode.engineModePage2()),
        [],
        backport.image(R.images.gui.maps.icons.battleHelp.turboshaftEngineHelp.
                       engine_mode_page_2()))
    return pages
 def __onMappingChanged(self, *args):
     self.as_updateTextsS(getReadableKey(CommandMapping.CMD_REQUEST_RECOVERY))
 def _iAmJoinedSquad(self, squadNum):
     keyName = getReadableKey(CommandMapping.CMD_VOICECHAT_ENABLE)
     key = getKey(CommandMapping.CMD_VOICECHAT_ENABLE)
     state = _getVIOPState(key)
     message = '#messenger:client/dynSquad/inviteAccepted/myself/%s' % state
     self.__sendMessage(message, squadNum=squadNum, keyName=keyName)
 def _squadCreatedImRecruit(self, squadNum):
     keyName = getReadableKey(CommandMapping.CMD_VOICECHAT_ENABLE)
     key = getKey(CommandMapping.CMD_VOICECHAT_ENABLE)
     state = _getVIOPState(key)
     message = '#messenger:client/dynSquad/created/recruit/%s' % state
     self.__sendMessage(message, squadNum=squadNum, keyName=keyName)
Exemple #24
0
 def _iAmJoinedSquad(self, squadNum):
     self.__sendMessage(_R_DYN_SQUAD.inviteAccepted.myself.dyn(
         self.__getState(CommandMapping.CMD_VOICECHAT_ENABLE)),
                        squadNum=squadNum,
                        keyName=getReadableKey(
                            CommandMapping.CMD_VOICECHAT_ENABLE))
Exemple #25
0
 def _squadCreatedImRecruit(self, squadNum):
     self.__sendMessage(_R_DYN_SQUAD.created.recruit.dyn(
         self.__getState(CommandMapping.CMD_VOICECHAT_ENABLE)),
                        squadNum=squadNum,
                        keyName=getReadableKey(
                            CommandMapping.CMD_VOICECHAT_ENABLE))