(self)
| 3429 | # this controls the session history chart. |
| 3430 | class ChartLabel: |
| 3431 | def __init__(self): |
| 3432 | self.start_x = from_right_edge(140) |
| 3433 | self.start_y = from_top_edge(105) |
| 3434 | self.line_spacing = calc_fontsize(15) |
| 3435 | self.column_spacing_12 = calc_fontsize(30) |
| 3436 | self.column_spacing_23 = calc_fontsize(70) |
| 3437 | self.font_size = calc_fontsize(10) |
| 3438 | self.color_normal = (128, 128, 128, 255) |
| 3439 | self.color_advance = (0, 160, 0, 255) |
| 3440 | self.color_fallback = (160, 0, 0, 255) |
| 3441 | self.column1 = [] |
| 3442 | self.column2 = [] |
| 3443 | self.column3 = [] |
| 3444 | for zap in range(0, 20): |
| 3445 | self.column1.append(pyglet.text.Label( |
| 3446 | '', font_size = self.font_size, |
| 3447 | x = self.start_x, y = self.start_y - zap * self.line_spacing, |
| 3448 | anchor_x = 'left', anchor_y = 'top', batch=batch)) |
| 3449 | self.column2.append(pyglet.text.Label( |
| 3450 | '', font_size = self.font_size, |
| 3451 | x = self.start_x + self.column_spacing_12, y = self.start_y - zap * self.line_spacing, |
| 3452 | anchor_x = 'left', anchor_y = 'top', batch=batch)) |
| 3453 | self.column3.append(pyglet.text.Label( |
| 3454 | '', font_size = self.font_size, |
| 3455 | x = self.start_x + self.column_spacing_12 + self.column_spacing_23, y = self.start_y - zap * self.line_spacing, |
| 3456 | anchor_x = 'left', anchor_y = 'top', batch=batch)) |
| 3457 | stats.parse_statsfile() |
| 3458 | self.update() |
| 3459 | |
| 3460 | def update(self): |
| 3461 | for x in range(0, 20): |
nothing calls this directly
no test coverage detected