scripts.engine.widgets package¶
Submodules¶
scripts.engine.widgets.panel module¶
-
class
Panel
(relative_rect: pygame.Rect, starting_layer_height: int, manager: pygame_gui.core.interfaces.manager_interface.IUIManagerInterface, *, element_id: str = 'panel', margins: Optional[Dict[str, int]] = None, container: Optional[pygame_gui.core.interfaces.container_interface.IContainerLikeInterface] = None, parent_element: Optional[pygame_gui.core.ui_element.UIElement] = None, object_id: Optional[Union[pygame_gui.core.ui_element.ObjectID, str]] = None, anchors: Optional[Dict[str, str]] = None, visible: int = 1)[source]¶
scripts.engine.widgets.screen_message module¶
-
class
ScreenMessage
(rect: pygame.Rect, text: str, manager: pygame_gui.ui_manager.UIManager)[source]¶ Bases:
pygame_gui.elements.ui_text_box.UITextBox
Show messages on the centre of the screen for a limited time
-
__init__
(rect: pygame.Rect, text: str, manager: pygame_gui.ui_manager.UIManager)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
scripts.engine.widgets.window module¶
-
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)