| 31 | self.scale(0.6) |
| 32 | |
| 33 | class 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 | |
| 54 | class AlgoStdioFilter(): |
| 55 | def __init__(self, c, cb): |