MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / AlgoPropertyPanel

Class AlgoPropertyPanel

animations/src/algo_objects.py:33–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 self.scale(0.6)
32
33class AlgoPropertyPanel(AlgoVGroup):
34 def __init__(self, scene, text_list, **kwargs):
35 super().__init__(**kwargs)
36
37 arr = [AlgoText(x, color=GREY) for x in text_list]
38 self.scene = scene
39
40 text_group = VGroup()
41 text_group.add(*arr)
42 text_group.arrange(direction=DOWN, aligned_edge=LEFT, buff=0.2)
43
44 self.text_group = text_group
45
46 rect = BackgroundRectangle(text_group, color=GREY_A, buff=0.5)
47 self.rect = rect
48 self.add(rect)
49 self.add(text_group)
50
51 def light(self, index, color=BLACK):
52 self.scene.play(ApplyMethod(self.text_group.submobjects[index].set_color, color))
53
54class AlgoStdioFilter():
55 def __init__(self, c, cb):

Callers 1

constructMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected