def __init__(self, content, path=None, image_name='image', is_expandable=False, anchor=ANCHOR_CENTER): Wrapper.__init__(self, content, is_expandable=is_expandable, anchor=anchor) # private self._frame = None if path is None: self._path = ['frame'] else: self._path = path self._image_name = image_name
def unload_graphics(self): if self._frame is not None: self._frame.unload() self._frame = None Wrapper.unload_graphics(self)
def delete(self): Wrapper.delete(self) if self._window is not None: self._window.remove_handlers(self) self._window = None self._batch._draw_list_dirty = True # forces resorting groups
def load_graphics(self): Wrapper.load_graphics(self) theme = self.theme[self.get_path()] if self._frame is None: template = theme[self._image_name] self._frame = template.generate(theme['gui_color'], **self.get_batch('panel'))