(self)
| 2735 | # this is the update notification |
| 2736 | class UpdateLabel: |
| 2737 | def __init__(self): |
| 2738 | # Some versions don't accept the align argument and some don't accept halign. |
| 2739 | # So try with one and if that fails use the other. |
| 2740 | try: |
| 2741 | self.label = pyglet.text.Label( |
| 2742 | '', |
| 2743 | multiline = True, width = field.size//3 - 4, align='middle', |
| 2744 | font_size=calc_fontsize(11), bold=True, |
| 2745 | color=(0, 128, 0, 255), |
| 2746 | x=width_center(), y=field.center_x + field.size // 6, |
| 2747 | anchor_x='center', anchor_y='center', batch=batch) |
| 2748 | except: |
| 2749 | self.label = pyglet.text.Label( |
| 2750 | '', |
| 2751 | multiline = True, width = field.size//3 - 4, halign='middle', |
| 2752 | font_size=calc_fontsize(11), bold=True, |
| 2753 | color=(0, 128, 0, 255), |
| 2754 | x=width_center(), y=field.center_x + field.size // 6, |
| 2755 | anchor_x='center', anchor_y='center', batch=batch) |
| 2756 | self.update() |
| 2757 | def update(self): |
| 2758 | if not mode.started and update_available: |
| 2759 | str_list = [] |
nothing calls this directly
no test coverage detected