Пример #1
0
 def display(self, label: Label, show: bool = True):
     """Display or hide a label.
     
     +label+ Label to be hidden or displayed.
     +show+ True to display, False to hide.
     """
     if show:
         label.batch = self.batch
     else:
         label.batch = None
Пример #2
0
 def add_text(self, text: Label):
     super(Viewport, self).add_text(text)
     text.batch = self._batch
     self._vertex_lists |= set(text._vertex_lists)