Пример #1
0
 def __createTableHeader(gameType, viewModel):
     cellLabel = GameModeCellModel()
     cellLabel.setText('')
     cellWinPoints = GameModeCellModel()
     cellWinPoints.setText(backport.text(_rBattlePass.howToEarnPoints.win.num(gameType)()))
     cellLosePoints = GameModeCellModel()
     cellLosePoints.setText(backport.text(_rBattlePass.howToEarnPoints.lose.num(gameType)()))
     tableRow = GameModeRowsModel()
     tableRow.cell.addViewModel(cellLabel)
     tableRow.cell.addViewModel(cellWinPoints)
     tableRow.cell.addViewModel(cellLosePoints)
     viewModel.tableRows.addViewModel(tableRow)
Пример #2
0
 def __createTable(self, gameType, viewModel):
     self.__createTableHeader(gameType, viewModel)
     for points in self.__battlePass.getPerBattlePoints(gameMode=gameType):
         cellLabel = GameModeCellModel()
         cellLabel.setText(backport.text(_rBattlePass.howToEarnPoints.rating.num(gameType)(), level=points.label))
         cellWinPoints = GameModeCellModel()
         cellWinPoints.setPoints(points.winPoint)
         cellLosePoints = GameModeCellModel()
         cellLosePoints.setPoints(points.losePoint)
         tableRow = GameModeRowsModel()
         tableRow.cell.addViewModel(cellLabel)
         tableRow.cell.addViewModel(cellWinPoints)
         tableRow.cell.addViewModel(cellLosePoints)
         viewModel.tableRows.addViewModel(tableRow)
Пример #3
0
 def __createBattleRoyalTableHeader(battleType, viewModel):
     cellLabelSolo = GameModeCellModel()
     cellLabelSolo.setText(backport.text(_rBattlePass.howToEarnPoints.solo.num(battleType)()))
     cellSoloPoints = GameModeCellModel()
     cellSoloPoints.setText('')
     cellLabelSquad = GameModeCellModel()
     cellLabelSquad.setText(backport.text(_rBattlePass.howToEarnPoints.squad.num(battleType)()))
     cellSquadPoints = GameModeCellModel()
     cellSquadPoints.setText('')
     tableRow = GameModeRowsModel()
     tableRow.cell.addViewModel(cellLabelSolo)
     tableRow.cell.addViewModel(cellSoloPoints)
     tableRow.cell.addViewModel(cellLabelSquad)
     tableRow.cell.addViewModel(cellSquadPoints)
     viewModel.tableRows.addViewModel(tableRow)
Пример #4
0
 def __createBattleRoyalTable(self, gameType, viewModel):
     self.__createBattleRoyalTableHeader(gameType, viewModel)
     previousLevelSolo = 1
     previousLevelSquad = 1
     for pointsSolo, pointsSquad in zip(
             self.__battlePassController.getPerBattleRoyalePoints(
                 gameMode=ARENA_BONUS_TYPE.BATTLE_ROYALE_SOLO),
             self.__battlePassController.getPerBattleRoyalePoints(
                 gameMode=ARENA_BONUS_TYPE.BATTLE_ROYALE_SQUAD)):
         tableRow = GameModeRowsModel()
         cellLabelSolo, previousLevelSolo = self.__createCellName(
             gameType, pointsSolo, previousLevelSolo)
         cellSoloPoints = GameModeCellModel()
         cellSoloPoints.setPoints(pointsSolo.points)
         cellLabelSquad, previousLevelSquad = self.__createCellName(
             gameType, pointsSquad, previousLevelSquad)
         cellSquadPoints = GameModeCellModel()
         cellSquadPoints.setPoints(pointsSquad.points)
         tableRow.cell.addViewModel(cellLabelSolo)
         tableRow.cell.addViewModel(cellSoloPoints)
         tableRow.cell.addViewModel(cellLabelSquad)
         tableRow.cell.addViewModel(cellSquadPoints)
         viewModel.tableRows.addViewModel(tableRow)
Пример #5
0
 def __createBattleRoyalTable(self, gameType, viewModel):
     self.__createBattleRoyalTableHeader(gameType, viewModel)
     previousLevelSolo = 1
     previousLevelSquad = 1
     for pointsSolo, pointsSquad in itertools.izip_longest(self.__battlePass.getPerBattleRoyalePoints(gameMode=ARENA_BONUS_TYPE.BATTLE_ROYALE_SOLO), self.__battlePass.getPerBattleRoyalePoints(gameMode=ARENA_BONUS_TYPE.BATTLE_ROYALE_SQUAD), fillvalue=0):
         tableRow = GameModeRowsModel()
         cellSoloPoints = GameModeCellModel()
         if pointsSolo == 0:
             cellLabelSolo, cellSoloPoints = self.__createEmptyCell()
         else:
             cellLabelSolo, previousLevelSolo = self.__createCellName(gameType, pointsSolo, previousLevelSolo)
             cellSoloPoints.setPoints(pointsSolo.points)
         cellSquadPoints = GameModeCellModel()
         if pointsSquad == 0:
             cellLabelSquad, cellSquadPoints = self.__createEmptyCell()
         else:
             cellLabelSquad, previousLevelSquad = self.__createCellName(gameType, pointsSquad, previousLevelSquad)
             cellSquadPoints.setPoints(pointsSquad.points)
         tableRow.cell.addViewModel(cellLabelSolo)
         tableRow.cell.addViewModel(cellSoloPoints)
         tableRow.cell.addViewModel(cellLabelSquad)
         tableRow.cell.addViewModel(cellSquadPoints)
         viewModel.tableRows.addViewModel(tableRow)