示例#1
0
 def __createCellName(gameType, points, previousLevel):
     cell = GameModeCellModel()
     if points.label - previousLevel > 0:
         cell.setText(backport.text(_rBattlePass.howToEarnPoints.rangeLevels.num(gameType)(), startLevel=previousLevel, endLevel=points.label))
     else:
         cell.setText(backport.text(_rBattlePass.howToEarnPoints.singleLevel.num(gameType)(), level=points.label))
     previousLevel = points.label + 1
     return (cell, previousLevel)
示例#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 __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)
示例#5
0
 def __createEmptyCell():
     cellLabel = GameModeCellModel()
     cellPoints = GameModeCellModel()
     cellLabel.setText('')
     cellPoints.setPoints(0)
     return (cellLabel, cellPoints)