UI Manager¶
-
class
UI[source]¶ Bases:
objectManage the UI, such as windows, resource bars etc
-
create_screen_message(message: str, colour: str = '#531B75', size: int = 4)[source]¶ Create a message on the screen.
-
element_is_active(element_type: scripts.engine.internal.constant.UIElement) → bool[source]¶ Check if an element has been created and is visible
-
element_is_visible(element_type: scripts.engine.internal.constant.UIElement) → bool[source]¶ Check if an element is visible.
-
get_gui_manager() → pygame_gui.ui_manager.UIManager[source]¶ Return the pygame_gui UI Manager
-
has_element(element_type: scripts.engine.internal.constant.UIElement) → bool[source]¶ Check if an element exists
-
kill_all_elements()[source]¶ Close and kill the game’s UI elements. Helper function to run kill_element on all elements.
-
kill_element(element_type: scripts.engine.internal.constant.UIElement)[source]¶ Remove any reference to the element.
-
register_element(element_type: UIElement, element: Union[Panel, Window])[source]¶ Register the specified UI element. Can be returned with get_element at a later date. If it already exists current instance will be overwritten.
-
set_element_visibility(element_type: scripts.engine.internal.constant.UIElement, visible: bool) → bool[source]¶ Set whether the element is visible or not. Returns true if successful, false if element not found.
-