MCPcopy Create free account
hub / github.com/brain-workshop/brainworkshop / __init__

Method __init__

brainworkshop.py:2737–2756  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2735# this is the update notification
2736class 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 = []

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
calc_fontsizeFunction · 0.85
width_centerFunction · 0.85

Tested by

no test coverage detected