def __updateClientState(self):
     if self.prbEntity is None:
         return
     else:
         permissions = self.prbEntity.getPermissions()
         if not permissions.canExitFromQueue():
             self.as_showExitS(False)
         guiType = prb_getters.getArenaGUIType(
             queueType=self.__provider.getQueueType())
         title = MENU.loading_battletypes(guiType)
         description = MENU.loading_battletypes_desc(guiType)
         if guiType != constants.ARENA_GUI_TYPE.UNKNOWN and guiType in constants.ARENA_GUI_TYPE_LABEL.LABELS:
             iconlabel = constants.ARENA_GUI_TYPE_LABEL.LABELS[guiType]
         else:
             iconlabel = 'neutral'
         if self.__provider.needAdditionalInfo():
             additional = self.__provider.additionalInfo()
         else:
             additional = ''
         vehicle = g_currentVehicle.item
         textLabel = self.__provider.getTankInfoLabel()
         tankName = vehicle.shortUserName
         iconPath = _getVehicleIconPath(vehicle.type)
         self.as_setTypeInfoS({
             'iconLabel': iconlabel,
             'title': title,
             'description': description,
             'additional': additional,
             'tankLabel': text_styles.main(textLabel),
             'tankIcon': iconPath,
             'tankName': tankName
         })
         return
示例#2
0
 def __updateFalloutSettings(self):
     battleType = self.__falloutCtrl.getBattleType()
     isVisible = self.__falloutCtrl.canChangeBattleType(
     ) and self.__falloutCtrl.isSelected()
     if isVisible:
         self.as_setDataS({
             'iconSource':
             '../maps/icons/battleTypes/64x64/%s.png' %
             ARENA_GUI_TYPE_LABEL.LABELS[getArenaGUIType(
                 queueType=battleType)],
             'buttonLabel':
             FALLOUT.HANGARSWITCH_BTNLBL,
             'label':
             text_styles.middleTitle('#fallout:hangarSwitch/%d' %
                                     battleType),
             'autoSquadEnabled':
             self.__falloutCtrl.isAutomatch(),
             'autoSquadLabel':
             FALLOUT.FALLOUTBATTLESELECTORWINDOW_AUTOSQUAD_LABEL,
             'autoSquadInfoTooltip':
             makeTooltip(
                 TOOLTIPS.FALLOUTBATTLESELECTORWINDOW_INFO_HEADER,
                 TOOLTIPS.FALLOUTBATTLESELECTORWINDOW_INFO_BODY,
                 attention=TOOLTIPS.FALLOUTBATTLESELECTORWINDOW_INFO_ALERT),
             'autoSquadIsVisible':
             self.__falloutCtrl.canAutomatch()
         })
     self.as_setVisibleS(isVisible)
示例#3
0
 def __updateClientState(self):
     if self.prbDispatcher is not None:
         permissions = self.prbDispatcher.getUnitFunctional().getPermissions()
         if permissions and not permissions.canExitFromQueue():
             self.as_showExitS(False)
     guiType = prb_getters.getArenaGUIType(queueType=self.__provider.getQueueType())
     title = '#menu:loading/battleTypes/%d' % guiType
     description = '#menu:loading/battleTypes/desc/%d' % guiType
     if guiType != constants.ARENA_GUI_TYPE.UNKNOWN and guiType in constants.ARENA_GUI_TYPE_LABEL.LABELS:
         iconlabel = constants.ARENA_GUI_TYPE_LABEL.LABELS[guiType]
     else:
         iconlabel = 'neutral'
     self.as_setTypeInfoS(iconlabel, title, description)
     return
示例#4
0
 def __updateClientState(self):
     if self.prbDispatcher is not None:
         permissions = self.prbDispatcher.getUnitFunctional(
         ).getPermissions()
         if permissions and not permissions.canExitFromQueue():
             self.as_showExitS(False)
     guiType = prb_getters.getArenaGUIType(
         queueType=self.__provider.getQueueType())
     title = '#menu:loading/battleTypes/%d' % guiType
     description = '#menu:loading/battleTypes/desc/%d' % guiType
     if guiType != constants.ARENA_GUI_TYPE.UNKNOWN and guiType in constants.ARENA_GUI_TYPE_LABEL.LABELS:
         iconlabel = constants.ARENA_GUI_TYPE_LABEL.LABELS[guiType]
     else:
         iconlabel = 'neutral'
     self.as_setTypeInfoS(iconlabel, title, description)
     return
示例#5
0
 def __updateClientState(self):
     permissions = self.prbEntity.getPermissions()
     if not permissions.canExitFromQueue():
         self.as_showExitS(False)
     guiType = prb_getters.getArenaGUIType(
         queueType=self.__provider.getQueueType())
     title = '#menu:loading/battleTypes/%d' % guiType
     description = '#menu:loading/battleTypes/desc/%d' % guiType
     if guiType != constants.ARENA_GUI_TYPE.UNKNOWN and guiType in constants.ARENA_GUI_TYPE_LABEL.LABELS:
         iconlabel = constants.ARENA_GUI_TYPE_LABEL.LABELS[guiType]
     else:
         iconlabel = 'neutral'
     if self.__provider.needAdditionalInfo():
         additional = self.__provider.additionalInfo()
     else:
         additional = ''
     self.as_setTypeInfoS({
         'iconLabel': iconlabel,
         'title': title,
         'description': description,
         'additional': additional
     })
示例#6
0
 def __updateClientState(self):
     dispatcher = g_prbLoader.getDispatcher()
     queueType = None
     if dispatcher is not None:
         queueType = dispatcher.getPreQueueFunctional().getEntityType()
         permissions = dispatcher.getUnitFunctional().getPermissions()
         if permissions and not permissions.canExitFromQueue():
             self.as_showExitS(False)
     postFix = ""
     if self.__isInEventBattles():
         queueType = constants.ARENA_GUI_TYPE.EVENT_BATTLES
         battleType = getFalloutCtrl().getBattleType()
         if battleType == constants.FALLOUT_BATTLE_TYPE.MULTITEAM:
             postFix = "/multiteam"
     guiType = prb_getters.getArenaGUIType(queueType=queueType)
     title = "#menu:loading/battleTypes/%d%s" % (guiType, postFix)
     description = "#menu:loading/battleTypes/desc/%d%s" % (guiType, postFix)
     if guiType != constants.ARENA_GUI_TYPE.UNKNOWN and guiType in constants.ARENA_GUI_TYPE_LABEL.LABELS:
         iconlabel = constants.ARENA_GUI_TYPE_LABEL.LABELS[guiType]
     else:
         iconlabel = "neutral"
     self.as_setTypeInfoS(iconlabel, title, description)
     return
示例#7
0
 def __updateClientState(self):
     dispatcher = g_prbLoader.getDispatcher()
     queueType = None
     if dispatcher is not None:
         queueType = dispatcher.getPreQueueFunctional().getEntityType()
         permissions = dispatcher.getUnitFunctional().getPermissions()
         if permissions and not permissions.canExitFromQueue():
             self.as_showExitS(False)
     postFix = ''
     if self.__isInEventBattles():
         queueType = constants.ARENA_GUI_TYPE.EVENT_BATTLES
         battleType = getFalloutCtrl().getBattleType()
         if battleType == constants.FALLOUT_BATTLE_TYPE.MULTITEAM:
             postFix = '/multiteam'
     guiType = prb_getters.getArenaGUIType(queueType=queueType)
     title = '#menu:loading/battleTypes/%d%s' % (guiType, postFix)
     description = '#menu:loading/battleTypes/desc/%d%s' % (guiType,
                                                            postFix)
     if guiType != constants.ARENA_GUI_TYPE.UNKNOWN and guiType in constants.ARENA_GUI_TYPE_LABEL.LABELS:
         iconlabel = constants.ARENA_GUI_TYPE_LABEL.LABELS[guiType]
     else:
         iconlabel = 'neutral'
     self.as_setTypeInfoS(iconlabel, title, description)
     return
示例#8
0
 def __updateFalloutSettings(self):
     battleType = self.__falloutCtrl.getBattleType()
     isVisible = self.__falloutCtrl.canChangeBattleType() and self.__falloutCtrl.isSelected()
     if isVisible:
         self.as_setDataS({'iconSource': '../maps/icons/battleTypes/64x64/%s.png' % ARENA_GUI_TYPE_LABEL.LABELS[getArenaGUIType(queueType=battleType)],
          'buttonLabel': FALLOUT.HANGARSWITCH_BTNLBL,
          'label': text_styles.middleTitle('#fallout:hangarSwitch/%d' % battleType),
          'autoSquadEnabled': self.__falloutCtrl.isAutomatch(),
          'autoSquadLabel': FALLOUT.FALLOUTBATTLESELECTORWINDOW_AUTOSQUAD_LABEL,
          'autoSquadInfoTooltip': makeTooltip(TOOLTIPS.FALLOUTBATTLESELECTORWINDOW_INFO_HEADER, TOOLTIPS.FALLOUTBATTLESELECTORWINDOW_INFO_BODY, attention=TOOLTIPS.FALLOUTBATTLESELECTORWINDOW_INFO_ALERT),
          'autoSquadIsVisible': self.__falloutCtrl.canAutomatch()})
     self.as_setVisibleS(isVisible)