Пример #1
0
 def __initFromCtx(self, ctx):
     selectedMap = ctx.get('map', '')
     self.__ctxVehicleType = ctx.get('vehicleType', '')
     self.__ctxSide = ctx.get('side', 0)
     self.__ctxShowAnimation = ctx.get('showAnimation', False)
     if self.__selectedMap != selectedMap and not selectedMap:
         MapsTrainingSound.onSelectedMap(False)
     self.__selectedMap = selectedMap
 def _finalize(self):
     self.__finalizationInProgress = True
     self.__blur.fini()
     if self.__tickCallback is not None:
         BigWorld.cancelCallback(self.__tickCallback)
     if not self.__selectedMap:
         MapsTrainingSound.onSelectedMap(True)
     super(MapsTrainingView, self)._finalize()
     return
Пример #3
0
 def __onBack(self):
     self.__selectedMap = ''
     self.__selectedScenario = 0
     self.__blur.disable()
     with self.viewModel.transaction() as model:
         model.setIsMapSelected(False)
         model.setIncompleteFilter(self.__preferences.incompleteFilter)
         model.setTitleFilter(self.__preferences.titleFilter)
     MapsTrainingSound.onSelectedMap(False)
     self.mapsTrainingController.reset()
Пример #4
0
 def _finalize(self):
     self.__finalizationInProgress = True
     self.__blur.fini()
     if self.__tickCallback is not None:
         BigWorld.cancelCallback(self.__tickCallback)
     if not self.__selectedMap:
         MapsTrainingSound.onSelectedMap(True)
     if self.prbEntity is not None and not self.prbEntity.isInQueue():
         g_currentPreviewVehicle.selectNoVehicle()
         g_currentPreviewVehicle.resetAppearance()
     super(MapsTrainingView, self)._finalize()
     return
Пример #5
0
 def __onSelect(self, args):
     self.__selectedMap = str(args.get('id'))
     with self.viewModel.transaction() as model:
         model.setIsMapSelected(True)
         MapsTrainingSound.onSelectedMap(True)
         self.__updateAllSelections(model)