Пример #1
0
 def __init__(self,
              layout_info: Union[LayoutInfo, None] = None,
              container: Union[pygame.Rect, 'UIElement', None] = None,
              padding: Union[LayoutInfo, None] = None):
     self.image = None
     super().__init__(layout_info=layout_info,
                      container=container,
                      padding=padding)
     get_event_manager().subscribe(None, 'on_custom_event', self)
Пример #2
0
 def _get_event_manager(self):
     return get_event_manager(root_element=self)
Пример #3
0
 def on_game_event(self, event):
     em = get_event_manager()
     em.on_custom_event(event)
Пример #4
0
 def __init__(self, game_client):
     self.game_client = game_client
     self.state = None
     self.pending_response = None
     get_event_manager().subscribe(None, 'on_custom_event', self)
Пример #5
0
 def _get_event_manager(self):
     return get_event_manager()