(self)
| 3458 | self.update() |
| 3459 | |
| 3460 | def update(self): |
| 3461 | for x in range(0, 20): |
| 3462 | self.column1[x].text = '' |
| 3463 | self.column2[x].text = '' |
| 3464 | self.column3[x].text = '' |
| 3465 | if mode.started: return |
| 3466 | index = 0 |
| 3467 | for x in range(len(stats.history) - 20, len(stats.history)): |
| 3468 | if x < 0: continue |
| 3469 | manual = stats.history[x][4] |
| 3470 | color = self.color_normal |
| 3471 | if not manual and stats.history[x][3] >= get_threshold_advance(): |
| 3472 | color = self.color_advance |
| 3473 | elif not manual and stats.history[x][3] < get_threshold_fallback(): |
| 3474 | color = self.color_fallback |
| 3475 | self.column1[index].color = color |
| 3476 | self.column2[index].color = color |
| 3477 | self.column3[index].color = color |
| 3478 | if manual: |
| 3479 | self.column1[index].text = 'M' |
| 3480 | elif stats.history[x][0] > -1: |
| 3481 | self.column1[index].text = '#%i' % stats.history[x][0] |
| 3482 | self.column2[index].text = mode.short_name(mode=stats.history[x][1], back=stats.history[x][2]) |
| 3483 | self.column3[index].text = '%i%%' % stats.history[x][3] |
| 3484 | index += 1 |
| 3485 | |
| 3486 | # this controls the title of the session history chart. |
| 3487 | class AverageLabel: |
no test coverage detected