Window¶
-
class
Window
(rect: pygame.Rect, manager: pygame_gui.core.interfaces.manager_interface.IUIManagerInterface, window_display_title: str = '', element_id: Optional[str] = None, object_id: Optional[Union[pygame_gui.core.ui_element.ObjectID, str]] = None, resizable: bool = False, visible: int = 1)[source]¶ Bases:
abc.ABC
,pygame_gui.elements.ui_window.UIWindow
Process closure of a window. Must be overriden in subclass. Usual use is creation of an event.
Example
- def process_close_button(self):
- event = pygame.event.Event(EventType.GAME, subtype=GameEvent.EXIT_MENU,
menu=UIElement.ACTOR_INFO)
pygame.event.post(event)