From edaca837dadb889445ef36811a2c48da9a6517eb Mon Sep 17 00:00:00 2001 From: Terry Simons Date: Sat, 13 Jan 2024 10:32:27 -0800 Subject: [PATCH] Deployed 487494b with MkDocs version: 1.5.3 --- index.html | 24840 ++++++- objects.inv | Bin 16165 -> 18650 bytes reference/glitchygames/color/index.html | 148 - reference/glitchygames/engine/index.html | 17443 ++--- reference/glitchygames/events/index.html | 757 +- reference/glitchygames/fonts/index.html | 669 +- reference/glitchygames/index.html | 24989 +++++++ reference/glitchygames/scenes/index.html | 3446 +- reference/glitchygames/sprites/index.html | 18341 +---- reference/glitchygames/ui/index.html | 72197 ++------------------ reference/index.html | 24675 ++++++- search/search_index.json | 2 +- sitemap.xml | 10 + sitemap.xml.gz | Bin 331 -> 337 bytes 14 files changed, 86961 insertions(+), 100556 deletions(-) create mode 100644 reference/glitchygames/index.html diff --git a/index.html b/index.html index 060cdcf..91d391d 100644 --- a/index.html +++ b/index.html @@ -42,6 +42,172 @@ - - -
- - - -
- glitchygames.color.Default.set_color - - -
-
set_color(palette_index: int, new_color: tuple) -> None
-
- -
- -

Sets the indexed color to the new PyGame Color.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - palette_index - (int) - – -
    -

    The index of the color to set.

    -
    -
  • -
  • - new_color - (tuple) - – -
    -

    A PyGame Color object in the format tuple[R: int, G: int, B: int]

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - -
glitchygames.color.Default.__init__ diff --git a/reference/glitchygames/engine/index.html b/reference/glitchygames/engine/index.html index 53d3390..3a92b46 100644 --- a/reference/glitchygames/engine/index.html +++ b/reference/glitchygames/engine/index.html @@ -974,50 +974,6 @@
Attributes
-
- glitchygames.engine.AudioManager.log - - - - class-attribute - instance-attribute - - -
-
log: Logger = LOG
-
- -
-
- -
- -
- - - -
- glitchygames.engine.AudioManager.__instances__ - - - - class-attribute - instance-attribute - - -
-
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - -
glitchygames.engine.AudioManager.proxies @@ -1069,50 +1025,6 @@
- - glitchygames.engine.AudioManager.AudioProxy.log - - - - class-attribute - instance-attribute - - - -
log: Logger = LOG
-
- -
-
- -
- -
- - - - - glitchygames.engine.AudioManager.AudioProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - glitchygames.engine.AudioManager.AudioProxy.game @@ -1158,18 +1070,17 @@
- - glitchygames.engine.AudioManager.AudioProxy.__new__ + + glitchygames.engine.AudioManager.AudioProxy.__init__ -
__new__(*args, **kwargs) -> object
+
__init__(game: object = None) -> None
 
-

Create a new instance of the class.

-

This method is called when a new instance of the class

+

Initialize the audio proxy.

@@ -1184,25 +1095,13 @@
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs + game + (object, default: + None +) –
    -

    The keyword arguments.

    +

    The game instance.

@@ -1223,10 +1122,10 @@
  • - object + None
    -

    The new instance of the class.

    +

    None

@@ -1234,30 +1133,6 @@
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
@@ -1267,18 +1142,17 @@
- - glitchygames.engine.AudioManager.AudioProxy.__getattr__ + + glitchygames.engine.AudioManager.AudioProxy.on_audio_device_added_event -
__getattr__(attr: str) -> Callable
+
on_audio_device_added_event(event: Event) -> None
 
-

Get an attribute.

-

This method is called when an attribute is not found.

+

Handle audio device added event.

@@ -1293,11 +1167,11 @@
  • - attr - (str) + event + (Event) –
    -

    The attribute to get.

    +

    The pygame event.

@@ -1318,10 +1192,10 @@
  • - Callable + None
    -

    The attribute.

    +

    None

@@ -1329,55 +1203,6 @@
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.AudioManager.AudioProxy.__subclasshook__ - - - - classmethod - - - -
__subclasshook__(subclass: object) -> bool
-
- -
- -

Override the default subclasshook to create an interface.

-
@@ -1387,17 +1212,17 @@
- - glitchygames.engine.AudioManager.AudioProxy.__init__ + + glitchygames.engine.AudioManager.AudioProxy.on_audio_device_removed_event -
__init__(game: object = None) -> None
+
on_audio_device_removed_event(event: Event) -> None
 
-

Initialize the audio proxy.

+

Handle audio device removed event.

@@ -1412,13 +1237,11 @@
  • - game - (object, default: - None -) + event + (Event) –
    -

    The game instance.

    +

    The pygame event.

@@ -1455,21 +1278,31 @@
+ +
+ +
+ + + +
Functions
+ +
- - glitchygames.engine.AudioManager.AudioProxy.on_audio_device_added_event +
+ glitchygames.engine.AudioManager.__init__ - -
on_audio_device_added_event(event: Event) -> None
+
+
__init__(game: object = None) -> None
 
-

Handle audio device added event.

+

Initialize the audio manager.

@@ -1484,11 +1317,13 @@
  • - event - (Event) + game + (object, default: + None +) –
    -

    The pygame event.

    +

    The game instance.

@@ -1529,17 +1364,21 @@
- - glitchygames.engine.AudioManager.AudioProxy.on_audio_device_removed_event +
+ glitchygames.engine.AudioManager.args + + + classmethod + - -
on_audio_device_removed_event(event: Event) -> None
+
+
args(parser: ArgumentParser) -> ArgumentParser
 
-

Handle audio device removed event.

+

Add arguments to the argument parser.

@@ -1554,11 +1393,11 @@
  • - event - (Event) + parser + (ArgumentParser) –
    -

    The pygame event.

    +

    The argument parser.

@@ -1579,10 +1418,10 @@
  • - None + ArgumentParser
    -

    None

    +

    The argument parser.

@@ -1602,7939 +1441,72 @@
-
Functions
+
-
+

+ glitchygames.engine.ControllerManager -

- glitchygames.engine.AudioManager.__new__ +
-
-
__new__(*args, **kwargs) -> object
-
+

+ Bases: ControllerEvents, ResourceManager

+ -

Create a new instance of the class.

-

This method is called when a new instance of the class

+

Manage controller events.

+ - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.AudioManager.__getattr__ - - -
-
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.AudioManager.__init__ - - -
-
__init__(game: object = None) -> None
-
- -
- -

Initialize the audio manager.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game instance.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.AudioManager.args - - - - classmethod - - -
-
args(parser: ArgumentParser) -> ArgumentParser
-
- -
- -

Add arguments to the argument parser.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - parser - (ArgumentParser) - – -
    -

    The argument parser.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - ArgumentParser - – -
    -

    The argument parser.

    -
    -
  • -
-
-
- -
- - - -
- - - - - - -
- - - -

- glitchygames.engine.ControllerManager - - -

- - -
-

- Bases: ControllerEvents, ResourceManager

- - -

Manage controller events.

- - - - -
- - - - - -
Attributes
- -
- - - -
- glitchygames.engine.ControllerManager.__instances__ - - - - class-attribute - instance-attribute - - -
-
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - -
- glitchygames.engine.ControllerManager.log - - - - class-attribute - instance-attribute - - -
-
log: Logger = LOG
-
- -
-
- -
- -
- - - -
- glitchygames.engine.ControllerManager.controllers - - - - instance-attribute - - -
-
controllers = {}
-
- -
-
- -
- -
- - - -
- glitchygames.engine.ControllerManager.proxies - - - - instance-attribute - - -
-
proxies = [game]
-
- -
-
- -
- -
- - - -
- glitchygames.engine.ControllerManager.game - - - - instance-attribute - - -
-
game = game
-
- -
-
- -
-
Classes
- -
- - - -
- glitchygames.engine.ControllerManager.ControllerProxy - - -
- - -
-

- Bases: ControllerEvents, ResourceManager

- - -

Proxy class for controller events.

- - - - -
- - - - - -Attributes - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.log - - - - class-attribute - instance-attribute - - - -
log: Logger = LOG
-
- -
-
- -
- -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.AXIS - - - - class-attribute - instance-attribute - - - -
AXIS: ClassVar = [
-    CONTROLLER_AXIS_LEFTX,
-    CONTROLLER_AXIS_LEFTY,
-    CONTROLLER_AXIS_RIGHTX,
-    CONTROLLER_AXIS_RIGHTY,
-    CONTROLLER_AXIS_TRIGGERLEFT,
-    CONTROLLER_AXIS_TRIGGERRIGHT,
-]
-
- -
-
- -
- -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.BUTTONS - - - - class-attribute - instance-attribute - - - -
BUTTONS: ClassVar = [
-    CONTROLLER_BUTTON_A,
-    CONTROLLER_BUTTON_B,
-    CONTROLLER_BUTTON_X,
-    CONTROLLER_BUTTON_Y,
-    CONTROLLER_BUTTON_DPAD_UP,
-    CONTROLLER_BUTTON_DPAD_DOWN,
-    CONTROLLER_BUTTON_DPAD_LEFT,
-    CONTROLLER_BUTTON_DPAD_RIGHT,
-    CONTROLLER_BUTTON_LEFTSHOULDER,
-    CONTROLLER_BUTTON_RIGHTSHOULDER,
-    CONTROLLER_BUTTON_LEFTSTICK,
-    CONTROLLER_BUTTON_RIGHTSTICK,
-    CONTROLLER_BUTTON_BACK,
-    CONTROLLER_BUTTON_GUIDE,
-    CONTROLLER_BUTTON_START,
-]
-
- -
-
- -
- -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.controller - - - - instance-attribute - - - -
controller = Controller(_id)
-
- -
-
- -
- -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.game - - - - instance-attribute - - - -
game = game
-
- -
-
- -
- -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.proxies - - - - instance-attribute - - - -
proxies = [game, controller]
-
- -
-
- -
- -Functions - - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.__new__ - - - -
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.__getattr__ - - - -
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.__subclasshook__ - - - - classmethod - - - -
__subclasshook__(subclass: object) -> bool
-
- -
- -

Override the default subclasshook to create an interface.

- -
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.__init__ - - - -
__init__(game: object = None, controller_id: int = -1) -> None
-
- -
- -

Initialize the controller proxy.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game object.

    -
    -
  • -
  • - controller_id - (int, default: - -1 -) - – -
    -

    The controller id.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_axis_motion_event - - - -
on_controller_axis_motion_event(event: Event) -> None
-
- -
- -

Handle controller axis motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_button_down_event - - - -
on_controller_button_down_event(event: Event) -> None
-
- -
- -

Handle controller button down events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_button_up_event - - - -
on_controller_button_up_event(event: Event) -> None
-
- -
- -

Handle controller button up events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_added_event - - - -
on_controller_device_added_event(event: Event) -> None
-
- -
- -

Handle controller device added events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_remapped_event - - - -
on_controller_device_remapped_event(event: Event) -> None
-
- -
- -

Handle controller device remapped events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_removed_event - - - -
on_controller_device_removed_event(event: Event) -> None
-
- -
- -

Handle controller device removed events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_down_event - - - -
on_controller_touchpad_down_event(event: Event) -> None
-
- -
- -

Handle controller touchpad down events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_motion_event - - - -
on_controller_touchpad_motion_event(event: Event) -> None
-
- -
- -

Handle controller touchpad motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_up_event - - - -
on_controller_touchpad_up_event(event: Event) -> None
-
- -
- -

Handle controller touchpad up events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.__str__ - - - -
__str__() -> LiteralString
-
- -
- -

Return a string representation of the controller.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -str( LiteralString -) – -
    -

    A string representation of the controller.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.ControllerManager.ControllerProxy.__repr__ - - - -
__repr__() -> str
-
- -
- -

Return a string representation of the controller object.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -str( str -) – -
    -

    A string representation of the controller object.

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
-
Functions
- - -
- - - -
- glitchygames.engine.ControllerManager.__new__ - - -
-
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.__getattr__ - - -
-
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.__subclasshook__ - - - - classmethod - - -
-
__subclasshook__(subclass: object) -> bool
-
- -
- -

Override the default subclasshook to create an interface.

- -
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.__init__ - - -
-
__init__(game: object = None) -> None
-
- -
- -

Initialize the ControllerManager.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game object.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.args - - - - classmethod - - -
-
args(parser: ArgumentParser) -> ArgumentParser
-
- -
- -

Add controller options to the parser.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - parser - (ArgumentParser) - – -
    -

    The argument parser.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - ArgumentParser - – -
    -

    argparse.ArgumentParser: The argument parser.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_axis_motion_event - - -
-
on_controller_axis_motion_event(event: Event) -> None
-
- -
- -

Handle controller axis motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_button_down_event - - -
-
on_controller_button_down_event(event: Event) -> None
-
- -
- -

Handle controller button down events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_button_up_event - - -
-
on_controller_button_up_event(event: Event) -> None
-
- -
- -

Handle controller button up events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_device_added_event - - -
-
on_controller_device_added_event(event: Event) -> None
-
- -
- -

Handle controller device added events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_device_remapped_event - - -
-
on_controller_device_remapped_event(event: Event) -> None
-
- -
- -

Handle controller device remapped events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_device_removed_event - - -
-
on_controller_device_removed_event(event: Event) -> None
-
- -
- -

Handle controller device removed events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_touchpad_down_event - - -
-
on_controller_touchpad_down_event(event: Event) -> None
-
- -
- -

Handle controller touchpad down events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_touchpad_motion_event - - -
-
on_controller_touchpad_motion_event(event: Event) -> None
-
- -
- -

Handle controller touchpad motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.ControllerManager.on_controller_touchpad_up_event - - -
-
on_controller_touchpad_up_event(event: Event) -> None
-
- -
- -

Handle controller touchpad up events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
- -
- - - -

- glitchygames.engine.DropManager - - -

- - -
-

- Bases: ResourceManager

- - -

Manage drop events.

- - - - -
- - - - - -
Attributes
- -
- - - -
- glitchygames.engine.DropManager.log - - - - class-attribute - instance-attribute - - -
-
log: Logger = LOG
-
- -
-
- -
- -
- - - -
- glitchygames.engine.DropManager.__instances__ - - - - class-attribute - instance-attribute - - -
-
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - -
- glitchygames.engine.DropManager.proxies - - - - instance-attribute - - -
-
proxies = [DropProxy(game=game)]
-
- -
-
- -
-
Classes
- -
- - - -
- glitchygames.engine.DropManager.DropProxy - - -
- - -
-

- Bases: DropEvents, ResourceManager

- - -

Proxy class for drop events.

- - - - -
- - - - - -Attributes - -
- - - - - glitchygames.engine.DropManager.DropProxy.log - - - - class-attribute - instance-attribute - - - -
log: Logger = LOG
-
- -
-
- -
- -
- - - - - glitchygames.engine.DropManager.DropProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - - - glitchygames.engine.DropManager.DropProxy.game - - - - instance-attribute - - - -
game = game
-
- -
-
- -
- -
- - - - - glitchygames.engine.DropManager.DropProxy.proxies - - - - instance-attribute - - - -
proxies = [game]
-
- -
-
- -
- -Functions - - -
- - - - - glitchygames.engine.DropManager.DropProxy.__new__ - - - -
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.DropManager.DropProxy.__getattr__ - - - -
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.DropManager.DropProxy.__subclasshook__ - - - - classmethod - - - -
__subclasshook__(subclass: object) -> bool
-
- -
- -

Override the default subclasshook to create an interface.

- -
- -
- - -
- - - - - glitchygames.engine.DropManager.DropProxy.__init__ - - - -
__init__(game: object = None) -> None
-
- -
- -

Initialize the drop proxy.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game instance.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.DropManager.DropProxy.on_drop_begin_event - - - -
on_drop_begin_event(event: Event) -> None
-
- -
- -

Handle drop begin event.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The pygame event.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.DropManager.DropProxy.on_drop_complete_event - - - -
on_drop_complete_event(event: Event) -> None
-
- -
- -

Handle drop complete event.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The pygame event.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.DropManager.DropProxy.on_drop_file_event - - - -
on_drop_file_event(event: Event) -> None
-
- -
- -

Handle drop file event.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The pygame event.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.DropManager.DropProxy.on_drop_text_event - - - -
on_drop_text_event(event: Event) -> None
-
- -
- -

Handle drop text event.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The pygame event.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
-
Functions
- - -
- - - -
- glitchygames.engine.DropManager.__new__ - - -
-
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.DropManager.__getattr__ - - -
-
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.DropManager.__init__ - - -
-
__init__(game: object = None) -> None
-
- -
- -

Initialize the drop manager.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game instance.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.DropManager.args - - - - classmethod - - -
-
args(parser: ArgumentParser) -> ArgumentParser
-
- -
- -

Add arguments to the argument parser.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - parser - (ArgumentParser) - – -
    -

    The argument parser.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - ArgumentParser - – -
    -

    The argument parser.

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
- -
- - - -

- glitchygames.engine.JoystickManager - - -

- - -
-

- Bases: JoystickEvents, ResourceManager

- - -

Manage joystick events.

- - - - -
- - - - - -
Attributes
- -
- - - -
- glitchygames.engine.JoystickManager.__instances__ - - - - class-attribute - instance-attribute - - -
-
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - -
- glitchygames.engine.JoystickManager.log - - - - class-attribute - instance-attribute - - -
-
log = LOG
-
- -
-
- -
- -
- - - -
- glitchygames.engine.JoystickManager.joysticks - - - - instance-attribute - - -
-
joysticks = {}
-
- -
-
- -
- -
- - - -
- glitchygames.engine.JoystickManager.game - - - - instance-attribute - - -
-
game = game
-
- -
-
- -
- -
- - - -
- glitchygames.engine.JoystickManager.proxies - - - - instance-attribute - - -
-
proxies = [game]
-
- -
-
- -
-
Classes
- -
- - - -
- glitchygames.engine.JoystickManager.JoystickProxy - - -
- - -
-

- Bases: JoystickEvents, ResourceManager

- - -

Joystick event proxy.

- - - - -
- - - - - -Attributes - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.log - - - - class-attribute - instance-attribute - - - -
log = LOG
-
- -
-
- -
- -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.joystick - - - - instance-attribute - - - -
joystick = Joystick(_id)
-
- -
-
- -
- -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.game - - - - instance-attribute - - - -
game = game
-
- -
-
- -
- -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.proxies - - - - instance-attribute - - - -
proxies = [game, joystick]
-
- -
-
- -
- -Functions - - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.__new__ - - - -
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.__getattr__ - - - -
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.__subclasshook__ - - - - classmethod - - - -
__subclasshook__(subclass: object) -> bool
-
- -
- -

Override the default subclasshook to create an interface.

- -
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.__init__ - - - -
__init__(game: object = None, joystick_id: int = -1) -> None
-
- -
- -

Initialize the joystick event proxy.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game object.

    -
    -
  • -
  • - joystick_id - (int, default: - -1 -) - – -
    -

    The joystick id.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.on_joy_axis_motion_event - - - -
on_joy_axis_motion_event(event: Event) -> None
-
- -
- -

Handle joystick axis motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.on_joy_button_down_event - - - -
on_joy_button_down_event(event: Event) -> None
-
- -
- -

Handle joystick button down events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.on_joy_button_up_event - - - -
on_joy_button_up_event(event: Event) -> None
-
- -
- -

Handle joystick button up events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.on_joy_hat_motion_event - - - -
on_joy_hat_motion_event(event: Event) -> None
-
- -
- -

Handle joystick hat motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.on_joy_ball_motion_event - - - -
on_joy_ball_motion_event(event: Event) -> None
-
- -
- -

Handle joystick ball motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.on_joy_device_added_event - - - -
on_joy_device_added_event(event: Event) -> None
-
- -
- -

Handle joystick device added events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.on_joy_device_removed_event - - - -
on_joy_device_removed_event(event: Event) -> None
-
- -
- -

Handle joystick device removed events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.get_name - - - -
get_name() -> str
-
- -
- -

Get the joystick name.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -str( str -) – -
    -

    The joystick name.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.get_init - - - -
get_init() -> bool
-
- -
- -

Get the joystick init status.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -bool( bool -) – -
    -

    The joystick init status.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.get_numaxes - - - -
get_numaxes() -> int
-
- -
- -

Get the number of axes.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -int( int -) – -
    -

    The number of axes.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.get_numballs - - - -
get_numballs() -> int
-
- -
- -

Get the number of trackballs.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -int( int -) – -
    -

    The number of trackballs.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.get_numbuttons - - - -
get_numbuttons() -> int
-
- -
- -

Get the number of buttons.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -int( int -) – -
    -

    The number of buttons.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.get_numhats - - - -
get_numhats() -> int
-
- -
- -

Get the number of hats.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -int( int -) – -
    -

    The number of hats.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.__str__ - - - -
__str__() -> str
-
- -
- -

Get the joystick info.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -str( str -) – -
    -

    The joystick info.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.JoystickManager.JoystickProxy.__repr__ - - - -
__repr__() -> str
-
- -
- -

Get the joystick representation.

- - - - - - - - - - - - - - -
Returns: -
    -
  • -str( str -) – -
    -

    The joystick representation.

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
-
Functions
- - -
- - - -
- glitchygames.engine.JoystickManager.__new__ - - -
-
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.__getattr__ - - -
-
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.__subclasshook__ - - - - classmethod - - -
-
__subclasshook__(subclass: object) -> bool
-
- -
- -

Override the default subclasshook to create an interface.

- -
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.__init__ - - -
-
__init__(game: object = None) -> None
-
- -
- -

Initialize the joystick event manager.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game object.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.args - - - - classmethod - - -
-
args(parser: ArgumentParser) -> ArgumentParser
-
- -
- -

Add joystick-specific arguments to the global parser.

-

This class method will get called automatically by the GameEngine class.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - parser - (ArgumentParser) - – -
    -

    The argument parser.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - ArgumentParser - – -
    -

    argparse.ArgumentParser

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.on_joy_axis_motion_event - - -
-
on_joy_axis_motion_event(event: Event) -> None
-
- -
- -

Handle joystick axis motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.on_joy_button_down_event - - -
-
on_joy_button_down_event(event: Event) -> None
-
- -
- -

Handle joystick button down events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.on_joy_button_up_event - - -
-
on_joy_button_up_event(event: Event) -> None
-
- -
- -

Handle joystick button up events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.on_joy_hat_motion_event - - -
-
on_joy_hat_motion_event(event: Event) -> None
-
- -
- -

Handle joystick hat motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.on_joy_ball_motion_event - - -
-
on_joy_ball_motion_event(event: Event) -> None
-
- -
- -

Handle joystick ball motion events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.on_joy_device_added_event - - -
-
on_joy_device_added_event(event: Event) -> None
-
- -
- -

Handle joystick device added events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.JoystickManager.on_joy_device_removed_event - - -
-
on_joy_device_removed_event(event: Event) -> None
-
- -
- -

Handle joystick device removed events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
- -
- - - -

- glitchygames.engine.KeyboardManager - - -

- - -
-

- Bases: ResourceManager

- - -

Manage keyboard events.

- - - - -
- - - - - -
Attributes
- -
- - - -
- glitchygames.engine.KeyboardManager.log - - - - class-attribute - instance-attribute - - -
-
log: Logger = LOG
-
- -
-
- -
- -
- - - -
- glitchygames.engine.KeyboardManager.__instances__ - - - - class-attribute - instance-attribute - - -
-
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - -
- glitchygames.engine.KeyboardManager.proxies - - - - instance-attribute - - -
-
proxies = [KeyboardProxy(game=game)]
-
- -
-
- -
-
Classes
- -
- - - -
- glitchygames.engine.KeyboardManager.KeyboardProxy - - -
- - -
-

- Bases: KeyboardEvents, ResourceManager

- - -

Keyboard event proxy.

- - - - -
- - - - - -Attributes - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.log - - - - class-attribute - instance-attribute - - - -
log: Logger = LOG
-
- -
-
- -
- -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.keys - - - - instance-attribute - - - -
keys = {}
-
- -
-
- -
- -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.game - - - - instance-attribute - - - -
game = game
-
- -
-
- -
- -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.proxies - - - - instance-attribute - - - -
proxies = [game, key]
-
- -
-
- -
- -Functions - - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.__new__ - - - -
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.__getattr__ - - - -
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.__subclasshook__ - - - - classmethod - - - -
__subclasshook__(subclass: object) -> bool
-
- -
- -

Override the default subclasshook to create an interface.

- -
- -
- - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.__init__ - - - -
__init__(game: object = None) -> None
-
- -
- -

Initialize the keyboard event proxy.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game object.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_down_event - - - -
on_key_down_event(event: Event) -> None
-
- -
- -

Handle key down events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_up_event - - - -
on_key_up_event(event: Event) -> None
-
- -
- -

Handle key up events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_chord_down_event - - - -
on_key_chord_down_event(event: Event) -> None
-
- -
- -

Handle key chord down events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
  • - keys_down - (list) - – -
    -

    The keys that are currently down.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_chord_up_event - - - -
on_key_chord_up_event(event: Event) -> None
-
- -
- -

Handle key chord up events.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
-
Functions
- - -
- - - -
- glitchygames.engine.KeyboardManager.__new__ - - -
-
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.KeyboardManager.__getattr__ - - -
-
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.KeyboardManager.__init__ - - -
-
__init__(game: object = None) -> None
-
- -
- -

Initialize the keyboard event manager.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game object.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.KeyboardManager.args - - - - classmethod - - -
-
args(parser: ArgumentParser) -> ArgumentParser
-
- -
- -

Add keyboard-specific arguments to the global parser.

-

This class method will get called automatically by the GameEngine class.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - parser - (ArgumentParser) - – -
    -

    The argument parser.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - ArgumentParser - – -
    -

    argparse.ArgumentParser

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
- -
- - - -

- glitchygames.engine.MidiManager - - -

- - -
-

- Bases: ResourceManager

- - -

Manage midi events.

- - - - -
- - - - - -
Attributes
- -
- - - -
- glitchygames.engine.MidiManager.log - - - - class-attribute - instance-attribute - - -
-
log: Logger = LOG
-
- -
-
- -
- -
- - - -
- glitchygames.engine.MidiManager.__instances__ - - - - class-attribute - instance-attribute - - -
-
__instances__: ClassVar = {}
-
- -
-
- -
- -
- - - -
- glitchygames.engine.MidiManager.proxies - - - - instance-attribute - - -
-
proxies = []
-
- -
-
- -
- -
Functions
- - -
- - - -
- glitchygames.engine.MidiManager.__new__ - - -
-
__new__(*args, **kwargs) -> object
-
- -
- -

Create a new instance of the class.

-

This method is called when a new instance of the class

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs - – -
    -

    The keyword arguments.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - object - – -
    -

    The new instance of the class.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the event is not handled by any proxy.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.MidiManager.__getattr__ - - -
-
__getattr__(attr: str) -> Callable
-
- -
- -

Get an attribute.

-

This method is called when an attribute is not found.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - attr - (str) - – -
    -

    The attribute to get.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - Callable - – -
    -

    The attribute.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.MidiManager.__init__ - - -
-
__init__(game: object = None) -> None
-
- -
- -

Initialize the midi event manager.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - game - (object, default: - None -) - – -
    -

    The game object.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - None - – -
    -

    None

    -
    -
  • -
-
-
- -
- - -
- - - -
- glitchygames.engine.MidiManager.args - - - - classmethod - - -
-
args(parser: ArgumentParser) -> ArgumentParser
-
- -
- -

Add midi-specific arguments to the global parser.

-

This class method will get called automatically by the GameEngine class.

- - - - - - - - - - - - - - -
Parameters: -
    -
  • - parser - (ArgumentParser) - – -
    -

    The argument parser.

    -
    -
  • -
-
- - - - - - - - - - - - - -
Returns: -
    -
  • - ArgumentParser - – -
    -

    argparse.ArgumentParser

    -
    -
  • -
-
-
- -
- - - -
- -
- - -
- -
+
-

- glitchygames.engine.MouseManager -

+
Attributes
+
-
-

- Bases: ResourceManager

- -

Mouse manager event handler.

+
+ glitchygames.engine.ControllerManager.log + + class-attribute + instance-attribute + -
- - - +
+
log: Logger = LOG
+
+
+
-
Attributes
+
-
- glitchygames.engine.MouseManager.log +
+ glitchygames.engine.ControllerManager.controllers - class-attribute instance-attribute
-
log: Logger = LOG
+
controllers = {}
 
@@ -9546,17 +1518,16 @@
-
- glitchygames.engine.MouseManager.__instances__ +
+ glitchygames.engine.ControllerManager.proxies - class-attribute instance-attribute
-
__instances__: ClassVar = {}
+
proxies = [game]
 
@@ -9568,8 +1539,8 @@
-
- glitchygames.engine.MouseManager.proxies +
+ glitchygames.engine.ControllerManager.game @@ -9577,21 +1548,21 @@
-
proxies = [MouseProxy(game=game)]
+
game = game
 
-
Classes
+
Classes
-
- glitchygames.engine.MouseManager.MouseProxy +
+ glitchygames.engine.ControllerManager.ControllerProxy
@@ -9599,10 +1570,10 @@

- Bases: MouseEvents, ResourceManager

+ Bases: ControllerEvents, ResourceManager

-

Mouse manager event proxy.

+

Proxy class for controller events.

@@ -9613,14 +1584,14 @@
-Attributes +Attributes
- - glitchygames.engine.MouseManager.MouseProxy.log + + glitchygames.engine.ControllerManager.ControllerProxy.log @@ -9629,7 +1600,7 @@
-
log: Logger = LOG
+
log: Logger = LOG
 
@@ -9641,8 +1612,8 @@
- - glitchygames.engine.MouseManager.MouseProxy.__instances__ + + glitchygames.engine.ControllerManager.ControllerProxy.AXIS @@ -9651,7 +1622,14 @@
-
__instances__: ClassVar = {}
+
AXIS: ClassVar = [
+    CONTROLLER_AXIS_LEFTX,
+    CONTROLLER_AXIS_LEFTY,
+    CONTROLLER_AXIS_RIGHTX,
+    CONTROLLER_AXIS_RIGHTY,
+    CONTROLLER_AXIS_TRIGGERLEFT,
+    CONTROLLER_AXIS_TRIGGERRIGHT,
+]
 
@@ -9663,16 +1641,33 @@
- - glitchygames.engine.MouseManager.MouseProxy.mouse_state + + glitchygames.engine.ControllerManager.ControllerProxy.BUTTONS + class-attribute instance-attribute -
mouse_state = {}
+
BUTTONS: ClassVar = [
+    CONTROLLER_BUTTON_A,
+    CONTROLLER_BUTTON_B,
+    CONTROLLER_BUTTON_X,
+    CONTROLLER_BUTTON_Y,
+    CONTROLLER_BUTTON_DPAD_UP,
+    CONTROLLER_BUTTON_DPAD_DOWN,
+    CONTROLLER_BUTTON_DPAD_LEFT,
+    CONTROLLER_BUTTON_DPAD_RIGHT,
+    CONTROLLER_BUTTON_LEFTSHOULDER,
+    CONTROLLER_BUTTON_RIGHTSHOULDER,
+    CONTROLLER_BUTTON_LEFTSTICK,
+    CONTROLLER_BUTTON_RIGHTSTICK,
+    CONTROLLER_BUTTON_BACK,
+    CONTROLLER_BUTTON_GUIDE,
+    CONTROLLER_BUTTON_START,
+]
 
@@ -9684,8 +1679,8 @@
- - glitchygames.engine.MouseManager.MouseProxy.mouse_dragging + + glitchygames.engine.ControllerManager.ControllerProxy.controller @@ -9693,7 +1688,7 @@
-
mouse_dragging = False
+
controller = Controller(_id)
 
@@ -9705,8 +1700,8 @@
- - glitchygames.engine.MouseManager.MouseProxy.mouse_dropping + + glitchygames.engine.ControllerManager.ControllerProxy.game @@ -9714,7 +1709,7 @@
-
mouse_dropping = False
+
game = game
 
@@ -9726,8 +1721,8 @@
- - glitchygames.engine.MouseManager.MouseProxy.current_focus + + glitchygames.engine.ControllerManager.ControllerProxy.proxies @@ -9735,7 +1730,7 @@
-
current_focus = None
+
proxies = [game, controller]
 
@@ -9743,109 +1738,386 @@
-
+Functions + +
- - glitchygames.engine.MouseManager.MouseProxy.previous_focus + + glitchygames.engine.ControllerManager.ControllerProxy.__init__ + + + +
__init__(game: object = None, controller_id: int = -1) -> None
+
+ +
- - instance-attribute - +

Initialize the controller proxy.

+ + + + + + + + + + + + + + +
Parameters: +
    +
  • + game + (object, default: + None +) + – +
    +

    The game object.

    +
    +
  • +
  • + controller_id + (int, default: + -1 +) + – +
    +

    The controller id.

    +
    +
  • +
+
+ + + + + + + + + + + + + +
Returns: +
    +
  • + None + – +
    +

    None

    +
    +
  • +
+
+
+ +
+ + +
+ + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_axis_motion_event + -
previous_focus = None
+
on_controller_axis_motion_event(event: Event) -> None
 
+ +

Handle controller axis motion events.

+ + + + + + + + + + + + + + +
Parameters: +
    +
  • + event + (Event) + – +
    +

    The event to handle.

    +
    +
  • +
+
+ + + + + + + + + + + + + +
Returns: +
    +
  • + None + – +
    +

    None

    +
    +
  • +
+
-
+
- - glitchygames.engine.MouseManager.MouseProxy.focus_locked - - - instance-attribute - + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_button_down_event + -
focus_locked = False
+
on_controller_button_down_event(event: Event) -> None
 
+ +

Handle controller button down events.

+ + + + + + + + + + + + + + +
Parameters: +
    +
  • + event + (Event) + – +
    +

    The event to handle.

    +
    +
  • +
+
+ + + + + + + + + + + + + +
Returns: +
    +
  • + None + – +
    +

    None

    +
    +
  • +
+
-
+
- - glitchygames.engine.MouseManager.MouseProxy.game - - - instance-attribute - + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_button_up_event + -
game = game
+
on_controller_button_up_event(event: Event) -> None
 
+ +

Handle controller button up events.

+ + + + + + + + + + + + + + +
Parameters: +
    +
  • + event + (Event) + – +
    +

    The event to handle.

    +
    +
  • +
+
+ + + + + + + + + + + + + +
Returns: +
    +
  • + None + – +
    +

    None

    +
    +
  • +
+
-
+
- - glitchygames.engine.MouseManager.MouseProxy.proxies - - - instance-attribute - + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_added_event + -
proxies = [game, mouse]
+
on_controller_device_added_event(event: Event) -> None
 
+ +

Handle controller device added events.

+ + + + + + + + + + + + + + +
Parameters: +
    +
  • + event + (Event) + – +
    +

    The event to handle.

    +
    +
  • +
+
+ + + + + + + + + + + + + +
Returns: +
    +
  • + None + – +
    +

    None

    +
    +
  • +
+
-Functions -
- - glitchygames.engine.MouseManager.MouseProxy.__new__ + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_remapped_event -
__new__(*args, **kwargs) -> object
+
on_controller_device_remapped_event(event: Event) -> None
 
-

Create a new instance of the class.

-

This method is called when a new instance of the class

+

Handle controller device remapped events.

@@ -9860,25 +2132,11 @@
  • - cls - (Self) - – -
    -

    The class.

    -
    -
  • -
  • - *args - – -
    -

    The positional arguments.

    -
    -
  • -
  • - **kwargs + event + (Event) –
    -

    The keyword arguments.

    +

    The event to handle.

@@ -9899,10 +2157,10 @@
  • - object + None
    -

    The new instance of the class.

    +

    None

@@ -9910,6 +2168,27 @@
+
+ +
+ + +
+ + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_removed_event + + + +
on_controller_device_removed_event(event: Event) -> None
+
+ +
+ +

Handle controller device removed events.

+ @@ -9919,14 +2198,15 @@
- +
Raises:Parameters:
  • - AttributeError + event + (Event) –
    -

    If the event is not handled by any proxy.

    +

    The event to handle.

@@ -9934,6 +2214,30 @@
+ + + + + + + + + + + + + +
Returns: +
    +
  • + None + – +
    +

    None

    +
    +
  • +
+
@@ -9943,18 +2247,17 @@
- - glitchygames.engine.MouseManager.MouseProxy.__getattr__ + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_down_event -
__getattr__(attr: str) -> Callable
+
on_controller_touchpad_down_event(event: Event) -> None
 
-

Get an attribute.

-

This method is called when an attribute is not found.

+

Handle controller touchpad down events.

@@ -9969,11 +2272,11 @@
  • - attr - (str) + event + (Event) –
    -

    The attribute to get.

    +

    The event to handle.

@@ -9994,10 +2297,10 @@
  • - Callable + None
    -

    The attribute.

    +

    None

@@ -10005,55 +2308,6 @@
- - - - - - - - - - - - - -
Raises: -
    -
  • - AttributeError - – -
    -

    If the attribute is not found.

    -
    -
  • -
-
-
- -
- - -
- - - - - glitchygames.engine.MouseManager.MouseProxy.__subclasshook__ - - - - classmethod - - - -
__subclasshook__(subclass: object) -> bool
-
- -
- -

Override the default subclasshook to create an interface.

-
@@ -10063,17 +2317,17 @@
- - glitchygames.engine.MouseManager.MouseProxy.__init__ + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_motion_event -
__init__(game: object = None) -> None
+
on_controller_touchpad_motion_event(event: Event) -> None
 
-

Initialize the mouse manager event proxy.

+

Handle controller touchpad motion events.

@@ -10088,13 +2342,11 @@
  • - game - (object, default: - None -) + event + (Event) –
    -

    The game instance.

    +

    The event to handle.

@@ -10135,17 +2387,17 @@
- - glitchygames.engine.MouseManager.MouseProxy.on_mouse_motion_event + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_up_event -
on_mouse_motion_event(event: Event) -> None
+
on_controller_touchpad_up_event(event: Event) -> None
 
-

Handle the mouse motion event.

+

Handle controller touchpad up events.

@@ -10205,17 +2457,17 @@
- - glitchygames.engine.MouseManager.MouseProxy.on_mouse_drag_event + + glitchygames.engine.ControllerManager.ControllerProxy.__str__ -
on_mouse_drag_event(event: Event, trigger: Event) -> None
+
__str__() -> LiteralString
 
-

Handle the mouse drag event.

+

Return a string representation of the controller.

@@ -10226,30 +2478,42 @@
- Parameters: - -
    -
  • - event - (Event) - – -
    -

    The event to handle.

    -
    -
  • -
  • - trigger - (Event) - – -
    -

    The triggering event.

    -
    -
  • -
- + Returns: + +
    +
  • +str( LiteralString +) – +
    +

    A string representation of the controller.

    +
    +
  • +
+ +
+ +
+ + +
+ + + + + glitchygames.engine.ControllerManager.ControllerProxy.__repr__ + + + +
__repr__() -> str
+
+ +
+ +

Return a string representation of the controller object.

+ @@ -10263,10 +2527,10 @@
@@ -10517,17 +2773,17 @@
- - glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_drag_event +
+ glitchygames.engine.ControllerManager.on_controller_button_down_event - -
on_middle_mouse_drag_event(event: Event, trigger: Event) -> None
+
+
on_controller_button_down_event(event: Event) -> None
 
-

Handle the middle mouse drag event.

+

Handle controller button down events.

@@ -10549,14 +2805,6 @@

The event to handle.

-
  • - trigger - (Event) - – -
    -

    The triggering event.

    -
    -
  • @@ -10595,17 +2843,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_drop_event +
    + glitchygames.engine.ControllerManager.on_controller_button_up_event - -
    on_middle_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    +
    on_controller_button_up_event(event: Event) -> None
     
    -

    Handle the middle mouse drop event.

    +

    Handle controller button up events.

    @@ -10627,14 +2875,6 @@

    The event to handle.

    -
  • - trigger - (Event) - – -
    -

    The triggering event.

    -
    -
  • @@ -10673,17 +2913,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_drag_event +
    + glitchygames.engine.ControllerManager.on_controller_device_added_event - -
    on_right_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    +
    on_controller_device_added_event(event: Event) -> None
     
    -

    Handle the right mouse drag event.

    +

    Handle controller device added events.

    @@ -10705,14 +2945,6 @@

    The event to handle.

    -
  • - trigger - (Event) - – -
    -

    The triggering event.

    -
    -
  • @@ -10751,17 +2983,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_drop_event +
    + glitchygames.engine.ControllerManager.on_controller_device_remapped_event - -
    on_right_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    +
    on_controller_device_remapped_event(event: Event) -> None
     
    -

    Handle the right mouse drop event.

    +

    Handle controller device remapped events.

    @@ -10783,14 +3015,6 @@

    The event to handle.

    -
  • - trigger - (Event) - – -
    -

    The triggering event.

    -
    -
  • @@ -10829,17 +3053,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_mouse_focus_event +
    + glitchygames.engine.ControllerManager.on_controller_device_removed_event - -
    on_mouse_focus_event(event: Event, entering_focus: object) -> None
    +
    +
    on_controller_device_removed_event(event: Event) -> None
     
    -

    Handle the mouse focus event.

    +

    Handle controller device removed events.

    @@ -10861,14 +3085,6 @@

    The event to handle.

    -
  • - entering_focus - (object) - – -
    -

    The object entering focus.

    -
    -
  • @@ -10907,17 +3123,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_mouse_unfocus_event +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_down_event - -
    on_mouse_unfocus_event(event: Event, leaving_focus: object) -> None
    +
    +
    on_controller_touchpad_down_event(event: Event) -> None
     
    -

    Handle the mouse unfocus event.

    +

    Handle controller touchpad down events.

    @@ -10939,14 +3155,6 @@

    The event to handle.

    -
  • - leaving_focus - (object) - – -
    -

    The object leaving focus.

    -
    -
  • @@ -10985,17 +3193,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_mouse_button_up_event +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_motion_event - -
    on_mouse_button_up_event(event: Event) -> None
    +
    +
    on_controller_touchpad_motion_event(event: Event) -> None
     
    -

    Handle the mouse button up event.

    +

    Handle controller touchpad motion events.

    @@ -11055,17 +3263,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_button_up_event +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_up_event - -
    on_left_mouse_button_up_event(event: Event) -> None
    +
    +
    on_controller_touchpad_up_event(event: Event) -> None
     
    -

    Handle the left mouse button up event.

    +

    Handle controller touchpad up events.

    @@ -11121,21 +3329,154 @@
    + +
    + + + + + + +
    + + + +

    + glitchygames.engine.DropManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage drop events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.DropManager.proxies + + + + instance-attribute + + +
    +
    proxies = [DropProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.DropManager.DropProxy + + +
    + + +
    +

    + Bases: DropEvents, ResourceManager

    + + +

    Proxy class for drop events.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.DropManager.DropProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.DropManager.DropProxy.proxies + + + + instance-attribute + + + +
    proxies = [game]
    +
    + +
    +
    + +
    + +Functions + +
    - - glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_button_up_event + + glitchygames.engine.DropManager.DropProxy.__init__ -
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    __init__(game: object = None) -> None
     
    -

    Handle the middle mouse button up event.

    +

    Initialize the drop proxy.

    @@ -11150,11 +3491,13 @@
    • - None - – +str( str +) –
      -

      None

      +

      A string representation of the controller object.

    @@ -10279,21 +2543,31 @@
    + + + + + + + +
    Functions
    + +
    - - glitchygames.engine.MouseManager.MouseProxy.on_mouse_drop_event +
    + glitchygames.engine.ControllerManager.__init__ - -
    on_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    +
    __init__(game: object = None) -> None
     
    -

    Handle the mouse drop event.

    +

    Initialize the ControllerManager.

    @@ -10308,19 +2582,13 @@
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (Event) + game + (object, default: + None +) –
      -

      The triggering event.

      +

      The game object.

    @@ -10361,17 +2629,21 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_drag_event +
    + glitchygames.engine.ControllerManager.args + + + classmethod + - -
    on_left_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -

    Handle the left mouse drag event.

    +

    Add controller options to the parser.

    @@ -10386,19 +2658,11 @@
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (Event) + parser + (ArgumentParser) –
      -

      The triggering event.

      +

      The argument parser.

    @@ -10419,10 +2683,10 @@
    • - None + ArgumentParser
      -

      None

      +

      argparse.ArgumentParser: The argument parser.

    @@ -10439,17 +2703,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_drop_event +
    + glitchygames.engine.ControllerManager.on_controller_axis_motion_event - -
    on_left_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    +
    on_controller_axis_motion_event(event: Event) -> None
     
    -

    Handle the left mouse drop event.

    +

    Handle controller axis motion events.

    @@ -10471,14 +2735,6 @@

    The event to handle.

    -
  • - trigger - (Event) - – -
    -

    The triggering event.

    -
    -
    • - event - (Event) + game + (object, default: + None +) –
      -

      The event to handle.

      +

      The game instance.

    @@ -11195,17 +3538,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_button_up_event + + glitchygames.engine.DropManager.DropProxy.on_drop_begin_event -
    on_right_mouse_button_up_event(event: Event) -> None
    +
    on_drop_begin_event(event: Event) -> None
     
    -

    Handle the right mouse button up event.

    +

    Handle drop begin event.

    @@ -11224,7 +3567,7 @@
    (Event) –
    -

    The event to handle.

    +

    The pygame event.

    @@ -11265,17 +3608,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_mouse_button_down_event + + glitchygames.engine.DropManager.DropProxy.on_drop_complete_event -
    on_mouse_button_down_event(event: Event) -> None
    +
    on_drop_complete_event(event: Event) -> None
     
    -

    Handle the mouse button down event.

    +

    Handle drop complete event.

    @@ -11294,7 +3637,7 @@
    (Event) –
    -

    The event to handle.

    +

    The pygame event.

    @@ -11335,17 +3678,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_button_down_event + + glitchygames.engine.DropManager.DropProxy.on_drop_file_event -
    on_left_mouse_button_down_event(event: Event) -> None
    +
    on_drop_file_event(event: Event) -> None
     
    -

    Handle the left mouse button down event.

    +

    Handle drop file event.

    @@ -11364,7 +3707,7 @@
    (Event) –
    -

    The event to handle.

    +

    The pygame event.

    @@ -11405,17 +3748,17 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_button_down_event + + glitchygames.engine.DropManager.DropProxy.on_drop_text_event -
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    on_drop_text_event(event: Event) -> None
     
    -

    Handle the middle mouse button down event.

    +

    Handle drop text event.

    @@ -11434,7 +3777,7 @@
    (Event) –
    -

    The event to handle.

    +

    The pygame event.

    @@ -11471,21 +3814,31 @@
    + +
    + +
    + + +
    +
    Functions
    + +
    - - glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_button_down_event +
    + glitchygames.engine.DropManager.__init__ - -
    on_right_mouse_button_down_event(event: Event) -> None
    +
    +
    __init__(game: object = None) -> None
     
    -

    Handle the right mouse button down event.

    +

    Initialize the drop manager.

    @@ -11500,11 +3853,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The event to handle.

      +

      The game instance.

    @@ -11545,17 +3900,21 @@
    - - glitchygames.engine.MouseManager.MouseProxy.on_mouse_scroll_down_event +
    + glitchygames.engine.DropManager.args + + + classmethod + - -
    on_mouse_scroll_down_event(event: Event) -> None
    +
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -

    Handle the mouse scroll down event.

    +

    Add arguments to the argument parser.

    @@ -11570,11 +3929,11 @@
    • - event - (Event) + parser + (ArgumentParser) –
      -

      The event to handle.

      +

      The argument parser.

    @@ -11595,10 +3954,10 @@
    • - None + ArgumentParser
      -

      None

      +

      The argument parser.

    @@ -11608,175 +3967,264 @@
    -
    +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.JoystickManager + + +

    + + +
    +

    + Bases: JoystickEvents, ResourceManager

    + + +

    Manage joystick events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.JoystickManager.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.joysticks + + + + instance-attribute + + +
    +
    joysticks = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.game + + + + instance-attribute + + +
    +
    game = game
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.proxies + + + + instance-attribute + + +
    +
    proxies = [game]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.JoystickManager.JoystickProxy + + +
    + + +
    +

    + Bases: JoystickEvents, ResourceManager

    + + +

    Joystick event proxy.

    + + + + +
    + + + + +Attributes -
    +
    - - glitchygames.engine.MouseManager.MouseProxy.on_mouse_scroll_up_event + + glitchygames.engine.JoystickManager.JoystickProxy.log + + + class-attribute + instance-attribute + -
    on_mouse_scroll_up_event(event: Event) -> None
    +
    log = LOG
     
    - -

    Handle the mouse scroll up event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + glitchygames.engine.JoystickManager.JoystickProxy.joystick + + + + instance-attribute + + + +
    joystick = Joystick(_id)
    +
    + +
    - -
    +
    - - glitchygames.engine.MouseManager.MouseProxy.on_mouse_wheel_event + + glitchygames.engine.JoystickManager.JoystickProxy.game + + + instance-attribute + -
    on_mouse_wheel_event(event: Event) -> None
    +
    game = game
     
    - -

    Handle the mouse wheel event.

    - - +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    -
    + + glitchygames.engine.JoystickManager.JoystickProxy.proxies + + + instance-attribute + -
    +
    +
    proxies = [game, joystick]
    +
    +
    -
    -
    Functions
    + +Functions
    -
    - glitchygames.engine.MouseManager.__new__ + + glitchygames.engine.JoystickManager.JoystickProxy.__init__ -
    -
    __new__(*args, **kwargs) -> object
    +
    +
    __init__(game: object = None, joystick_id: int = -1) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Initialize the joystick event proxy.

    @@ -11791,25 +4239,23 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args + game + (object, default: + None +) –
      -

      The positional arguments.

      +

      The game object.

    • - **kwargs + joystick_id + (int, default: + -1 +) –
      -

      The keyword arguments.

      +

      The joystick id.

    @@ -11830,10 +4276,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -11841,30 +4287,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    @@ -11874,18 +4296,17 @@
    -
    - glitchygames.engine.MouseManager.__getattr__ + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_axis_motion_event -
    -
    __getattr__(attr: str) -> Callable
    +
    +
    on_joy_axis_motion_event(event: Event) -> None
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +

    Handle joystick axis motion events.

    @@ -11900,11 +4321,11 @@
    • - attr - (str) + event + (Event) –
      -

      The attribute to get.

      +

      The event to handle.

    @@ -11925,10 +4346,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -11936,30 +4357,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    @@ -11969,17 +4366,17 @@
    -
    - glitchygames.engine.MouseManager.__init__ + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_button_down_event -
    -
    __init__(game: object = None) -> None
    +
    +
    on_joy_button_down_event(event: Event) -> None
     
    -

    Initialize the mouse manager.

    +

    Handle joystick button down events.

    @@ -11994,13 +4391,11 @@
    • - game - (object, default: - None -) + event + (Event) –
      -

      The game instance.

      +

      The event to handle.

    @@ -12041,21 +4436,17 @@
    -
    - glitchygames.engine.MouseManager.args + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_button_up_event - - - classmethod - -
    -
    args(parser: ArgumentParser) -> ArgumentParser
    +
    +
    on_joy_button_up_event(event: Event) -> None
     
    -

    Add arguments to the argument parser.

    +

    Handle joystick button up events.

    @@ -12070,11 +4461,11 @@
    • - parser - (ArgumentParser) + event + (Event) –
      -

      The argument parser.

      +

      The event to handle.

    @@ -12095,7 +4486,7 @@
    • - ArgumentParser + None

      None

      @@ -12108,267 +4499,24 @@
      -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.engine.TouchManager - - -

    - - -
    -

    - Bases: ResourceManager

    - - -

    Touch event manager.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.engine.TouchManager.log - - - - class-attribute - instance-attribute - - -
    -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.TouchManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.TouchManager.proxies - - - - instance-attribute - - -
    -
    proxies = [TouchProxy(game=game)]
    -
    - -
    -
    - -
    -
    Classes
    - -
    - - - -
    - glitchygames.engine.TouchManager.TouchProxy - - -
    - - -
    -

    - Bases: TouchEvents, ResourceManager

    - - -

    Touch event proxy.

    - - - - -
    - - - - - -Attributes - -
    - - - - - glitchygames.engine.TouchManager.TouchProxy.log - - - - class-attribute - instance-attribute - - - -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.engine.TouchManager.TouchProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.engine.TouchManager.TouchProxy.fingers - - - - instance-attribute - - - -
    fingers: dict = {}
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.engine.TouchManager.TouchProxy.game - - - - instance-attribute - - - -
    game: object = game
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.engine.TouchManager.TouchProxy.proxies - - - - instance-attribute - - - -
    proxies: list = [game, touch]
    -
    - -
    -
    - -
    - -Functions +
    - - glitchygames.engine.TouchManager.TouchProxy.__new__ + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_hat_motion_event -
    __new__(*args, **kwargs) -> object
    +
    on_joy_hat_motion_event(event: Event) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Handle joystick hat motion events.

    @@ -12383,25 +4531,11 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs + event + (Event) –
      -

      The keyword arguments.

      +

      The event to handle.

    @@ -12422,10 +4556,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -12433,6 +4567,27 @@
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_ball_motion_event + + + +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick ball motion events.

    + @@ -12442,14 +4597,15 @@
    - +
    Raises:Parameters:
    • - AttributeError + event + (Event) –
      -

      If the event is not handled by any proxy.

      +

      The event to handle.

    @@ -12457,6 +4613,30 @@
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -12466,18 +4646,17 @@
    - - glitchygames.engine.TouchManager.TouchProxy.__getattr__ + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_device_added_event -
    __getattr__(attr: str) -> Callable
    +
    on_joy_device_added_event(event: Event) -> None
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +

    Handle joystick device added events.

    @@ -12492,11 +4671,11 @@
    • - attr - (str) + event + (Event) –
      -

      The attribute to get.

      +

      The event to handle.

    @@ -12517,10 +4696,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -12528,6 +4707,27 @@
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_device_removed_event + + + +
    on_joy_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device removed events.

    + @@ -12537,14 +4737,15 @@
    - +
    Raises:Parameters:
    • - AttributeError + event + (Event) –
      -

      If the attribute is not found.

      +

      The event to handle.

    @@ -12552,6 +4753,30 @@
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -12561,22 +4786,42 @@
    - - glitchygames.engine.TouchManager.TouchProxy.__subclasshook__ + + glitchygames.engine.JoystickManager.JoystickProxy.get_name - - - classmethod - -
    __subclasshook__(subclass: object) -> bool
    +
    get_name() -> str
     
    -

    Override the default subclasshook to create an interface.

    +

    Get the joystick name.

    + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      The joystick name.

      +
      +
    • +
    +
    @@ -12586,45 +4831,18 @@
    - - glitchygames.engine.TouchManager.TouchProxy.__init__ + + glitchygames.engine.JoystickManager.JoystickProxy.get_init -
    __init__(game: object = None) -> None
    +
    get_init() -> bool
     
    -

    Initialize the finger event proxy.

    - - +

    Get the joystick init status.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - game - (object, default: - None -) - – -
      -

      The game object.

      -
      -
    • -
    -
    @@ -12638,10 +4856,10 @@
    - - + +
    • - None - – +bool( bool +) –
      -

      None

      +

      The joystick init status.

    @@ -12658,17 +4876,17 @@
    - - glitchygames.engine.TouchManager.TouchProxy.on_touch_down_event + + glitchygames.engine.JoystickManager.JoystickProxy.get_numaxes -
    on_touch_down_event(event: Event) -> None
    +
    get_numaxes() -> int
     
    -

    Handle finger down events.

    +

    Get the number of axes.

    @@ -12679,22 +4897,42 @@
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    Returns: +
      +
    • +int( int +) – +
      +

      The number of axes.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numballs + + + +
    get_numballs() -> int
    +
    + +
    + +

    Get the number of trackballs.

    + @@ -12708,10 +4946,10 @@
    - - -
    • - None - – +int( int +) –
      -

      None

      +

      The number of trackballs.

    @@ -12728,43 +4966,18 @@
    - - glitchygames.engine.TouchManager.TouchProxy.on_touch_motion_event + + glitchygames.engine.JoystickManager.JoystickProxy.get_numbuttons -
    on_touch_motion_event(event: Event) -> None
    +
    get_numbuttons() -> int
     
    -

    Handle finger motion events.

    - - +

    Get the number of buttons.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -12778,10 +4991,10 @@
    • - None - – +int( int +) –
      -

      None

      +

      The number of buttons.

    @@ -12798,43 +5011,18 @@
    - - glitchygames.engine.TouchManager.TouchProxy.on_touch_up_event + + glitchygames.engine.JoystickManager.JoystickProxy.get_numhats -
    on_touch_up_event(event: Event) -> None
    +
    get_numhats() -> int
     
    -

    Handle finger up events.

    - - +

    Get the number of hats.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -12848,10 +5036,10 @@
    - - + +
    • - None - – +int( int +) –
      -

      None

      +

      The number of hats.

    @@ -12868,17 +5056,17 @@
    - - glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_down_event + + glitchygames.engine.JoystickManager.JoystickProxy.__str__ -
    on_multi_touch_down_event(event: Event) -> None
    +
    __str__() -> str
     
    -

    Handle multi-touch down events.

    +

    Get the joystick info.

    @@ -12889,22 +5077,42 @@
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    Returns: +
      +
    • +str( str +) – +
      +

      The joystick info.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.__repr__ + + + +
    __repr__() -> str
    +
    + +
    + +

    Get the joystick representation.

    + @@ -12918,10 +5126,10 @@
    • - None - – +str( str +) –
      -

      None

      +

      The joystick representation.

    @@ -12934,21 +5142,31 @@
    + + + + + + + +
    Functions
    + +
    - - glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_motion_event +
    + glitchygames.engine.JoystickManager.__init__ - -
    on_multi_touch_motion_event(event: Event) -> None
    +
    +
    __init__(game: object = None) -> None
     
    -

    Handle multi-touch motion events.

    +

    Initialize the joystick event manager.

    @@ -12963,11 +5181,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The event to handle.

      +

      The game object.

    @@ -13008,17 +5228,22 @@
    - - glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_up_event +
    + glitchygames.engine.JoystickManager.args + + + classmethod + - -
    on_multi_touch_up_event(event: Event) -> None
    +
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -

    Handle multi-touch up events.

    +

    Add joystick-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    @@ -13033,11 +5258,11 @@
    • - event - (Event) + parser + (ArgumentParser) –
      -

      The event to handle.

      +

      The argument parser.

    @@ -13058,10 +5283,10 @@
    • - None + ArgumentParser
      -

      None

      +

      argparse.ArgumentParser

    @@ -13074,32 +5299,21 @@
    - - - - - - - -
    Functions
    - -
    -
    - glitchygames.engine.TouchManager.__new__ +
    + glitchygames.engine.JoystickManager.on_joy_axis_motion_event
    -
    __new__(*args, **kwargs) -> object
    +
    on_joy_axis_motion_event(event: Event) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Handle joystick axis motion events.

    @@ -13114,25 +5328,11 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs + event + (Event) –
      -

      The keyword arguments.

      +

      The event to handle.

    @@ -13153,10 +5353,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -13164,30 +5364,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    @@ -13197,18 +5373,17 @@
    -
    - glitchygames.engine.TouchManager.__getattr__ +
    + glitchygames.engine.JoystickManager.on_joy_button_down_event
    -
    __getattr__(attr: str) -> Callable
    +
    on_joy_button_down_event(event: Event) -> None
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +

    Handle joystick button down events.

    @@ -13223,11 +5398,11 @@
    • - attr - (str) + event + (Event) –
      -

      The attribute to get.

      +

      The event to handle.

    @@ -13248,10 +5423,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -13259,30 +5434,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    @@ -13292,17 +5443,17 @@
    -
    - glitchygames.engine.TouchManager.__init__ +
    + glitchygames.engine.JoystickManager.on_joy_button_up_event
    -
    __init__(game: object = None) -> None
    +
    on_joy_button_up_event(event: Event) -> None
     
    -

    Initialize the touch event manager.

    +

    Handle joystick button up events.

    @@ -13317,13 +5468,11 @@
    • - game - (object, default: - None -) + event + (Event) –
      -

      The game object.

      +

      The event to handle.

    @@ -13351,252 +5500,30 @@
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.engine.WindowManager - - -

    - - -
    -

    - Bases: ResourceManager

    - - -

    Window manager event handler.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.engine.WindowManager.log - - - - class-attribute - instance-attribute - - -
    -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.WindowManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.WindowManager.proxies - - - - instance-attribute - - -
    -
    proxies = [WindowManagerProxy(game=game)]
    -
    - -
    -
    - -
    -
    Classes
    - -
    - - - -
    - glitchygames.engine.WindowManager.WindowManagerProxy - - -
    - - -
    -

    - Bases: WindowEvents, ResourceManager

    - - -

    Window manager event proxy.

    - - - - -
    - - - - - -Attributes - -
    - - - - - glitchygames.engine.WindowManager.WindowManagerProxy.log - - - - class-attribute - instance-attribute - - - -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.engine.WindowManager.WindowManagerProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.engine.WindowManager.WindowManagerProxy.game - - - - instance-attribute - - - -
    game = game
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.engine.WindowManager.WindowManagerProxy.proxies - - - - instance-attribute - - - -
    proxies = [game]
    -
    - -
    + + + +
    -Functions -
    - - glitchygames.engine.WindowManager.WindowManagerProxy.__new__ +
    + glitchygames.engine.JoystickManager.on_joy_hat_motion_event - -
    __new__(*args, **kwargs) -> object
    +
    +
    on_joy_hat_motion_event(event: Event) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Handle joystick hat motion events.

    @@ -13611,25 +5538,11 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs + event + (Event) –
      -

      The keyword arguments.

      +

      The event to handle.

    @@ -13650,10 +5563,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -13661,6 +5574,27 @@
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_ball_motion_event + + +
    +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick ball motion events.

    + @@ -13670,14 +5604,15 @@
    - + + + + + + + + + + +
    Raises:Parameters:
    • - AttributeError + event + (Event) –
      -

      If the event is not handled by any proxy.

      +

      The event to handle.

    @@ -13685,6 +5620,30 @@
    +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -13694,18 +5653,17 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.__getattr__ +
    + glitchygames.engine.JoystickManager.on_joy_device_added_event - -
    __getattr__(attr: str) -> Callable
    +
    +
    on_joy_device_added_event(event: Event) -> None
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +

    Handle joystick device added events.

    @@ -13720,11 +5678,11 @@
    • - attr - (str) + event + (Event) –
      -

      The attribute to get.

      +

      The event to handle.

    @@ -13745,10 +5703,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -13756,6 +5714,27 @@
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_device_removed_event + + +
    +
    on_joy_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device removed events.

    + @@ -13765,14 +5744,15 @@
    - + + + + + + + + + + +
    Raises:Parameters:
    • - AttributeError + event + (Event) –
      -

      If the attribute is not found.

      +

      The event to handle.

    @@ -13780,42 +5760,195 @@
    +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.KeyboardManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage keyboard events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.KeyboardManager.proxies + + + + instance-attribute + + +
    +
    proxies = [KeyboardProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.KeyboardManager.KeyboardProxy + + +
    + + +
    +

    + Bases: KeyboardEvents, ResourceManager

    + + +

    Keyboard event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.keys + + + + instance-attribute + + + +
    keys = {}
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    - -
    +
    - - glitchygames.engine.WindowManager.WindowManagerProxy.__subclasshook__ + + glitchygames.engine.KeyboardManager.KeyboardProxy.proxies - classmethod + instance-attribute -
    __subclasshook__(subclass: object) -> bool
    +
    proxies = [game, key]
     
    - -

    Override the default subclasshook to create an interface.

    -
    +Functions +
    - - glitchygames.engine.WindowManager.WindowManagerProxy.__init__ + + glitchygames.engine.KeyboardManager.KeyboardProxy.__init__ @@ -13824,7 +5957,7 @@
    -

    Initialize the window manager proxy.

    +

    Initialize the keyboard event proxy.

    @@ -13845,7 +5978,7 @@
    -

    The game instance.

    +

    The game object.

    @@ -13886,17 +6019,17 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_close_event + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_down_event -
    on_window_close_event(event: Event) -> None
    +
    on_key_down_event(event: Event) -> None
     
    -

    Handle the window close event.

    +

    Handle key down events.

    @@ -13956,17 +6089,17 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_enter_event + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_up_event -
    on_window_enter_event(event: Event) -> None
    +
    on_key_up_event(event: Event) -> None
     
    -

    Handle the window enter event.

    +

    Handle key up events.

    @@ -14026,17 +6159,17 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_exposed_event + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_chord_down_event -
    on_window_exposed_event(event: Event) -> None
    +
    on_key_chord_down_event(event: Event) -> None
     
    -

    Handle the window exposed event.

    +

    Handle key chord down events.

    @@ -14058,6 +6191,14 @@
    +

    The keys that are currently down.

    +
    + @@ -14096,17 +6237,17 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_focus_gained_event + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_chord_up_event -
    on_window_focus_gained_event(event: Event) -> None
    +
    on_key_chord_up_event(event: Event) -> None
     
    -

    Handle the window focus gained event.

    +

    Handle key chord up events.

    @@ -14162,91 +6303,31 @@
    - - - - - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_focus_lost_event - - - -
    on_window_focus_lost_event(event: Event) -> None
    -
    - -
    - -

    Handle the window focus lost event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    +
    Functions
    - - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_hidden_event +
    + glitchygames.engine.KeyboardManager.__init__ - -
    on_window_hidden_event(event: Event) -> None
    +
    +
    __init__(game: object = None) -> None
     
    -

    Handle the window hidden event.

    +

    Initialize the keyboard event manager.

    @@ -14261,11 +6342,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The event to handle.

      +

      The game object.

    @@ -14306,17 +6389,22 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_hit_test_event +
    + glitchygames.engine.KeyboardManager.args + + + classmethod + - -
    on_window_hit_test_event(event: Event) -> None
    +
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -

    Handle the window hit test event.

    +

    Add keyboard-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    @@ -14331,11 +6419,11 @@
    • - event - (Event) + parser + (ArgumentParser) –
      -

      The event to handle.

      +

      The argument parser.

    @@ -14356,10 +6444,10 @@
    • - None + ArgumentParser
      -

      None

      +

      argparse.ArgumentParser

    @@ -14372,91 +6460,61 @@
    +
    +
    - - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_leave_event +
    - -
    on_window_leave_event(event: Event) -> None
    -
    +
    -
    - -

    Handle the window leave event.

    +

    + glitchygames.engine.MidiManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage midi events.

    + + + + +
    + - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    -
    + + +
    Functions
    - - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_maximized_event +
    + glitchygames.engine.MidiManager.__init__ - -
    on_window_maximized_event(event: Event) -> None
    +
    +
    __init__(game: object = None) -> None
     
    -

    Handle the window maximized event.

    +

    Initialize the midi event manager.

    @@ -14471,11 +6529,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The event to handle.

      +

      The game object.

    @@ -14516,17 +6576,22 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_minimized_event +
    + glitchygames.engine.MidiManager.args + + + classmethod + - -
    on_window_minimized_event(event: Event) -> None
    +
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -

    Handle the window minimized event.

    +

    Add midi-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    @@ -14541,11 +6606,11 @@
    • - event - (Event) + parser + (ArgumentParser) –
      -

      The event to handle.

      +

      The argument parser.

    @@ -14566,10 +6631,10 @@
    • - None + ArgumentParser
      -

      None

      +

      argparse.ArgumentParser

    @@ -14582,231 +6647,280 @@
    +
    + +
    - - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_moved_event +
    + +
    + + + +

    + glitchygames.engine.MouseManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Mouse manager event handler.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.MouseManager.proxies + + + + instance-attribute + + +
    +
    proxies = [MouseProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.MouseManager.MouseProxy + + +
    + + +
    +

    + Bases: MouseEvents, ResourceManager

    + + +

    Mouse manager event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + glitchygames.engine.MouseManager.MouseProxy.mouse_state + + + + instance-attribute + + -
    on_window_moved_event(event: Event) -> None
    +
    mouse_state = {}
     
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.mouse_dragging + -

    Handle the window moved event.

    + + instance-attribute + +
    +
    mouse_dragging = False
    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + + + glitchygames.engine.MouseManager.MouseProxy.mouse_dropping + + + + instance-attribute + + + +
    mouse_dropping = False
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.current_focus + + + + instance-attribute + + + +
    current_focus = None
    +
    + +
    - -
    +
    - - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_resized_event + + glitchygames.engine.MouseManager.MouseProxy.previous_focus + + + instance-attribute + -
    on_window_resized_event(event: Event) -> None
    +
    previous_focus = None
     
    - -

    Handle the window resized event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + glitchygames.engine.MouseManager.MouseProxy.focus_locked + + + + instance-attribute + + + +
    focus_locked = False
    +
    + +
    - -
    +
    - - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_restored_event + + glitchygames.engine.MouseManager.MouseProxy.game + + + instance-attribute + -
    on_window_restored_event(event: Event) -> None
    +
    game = game
     
    - -

    Handle the window restored event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + glitchygames.engine.MouseManager.MouseProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, mouse]
    +
    + +
    +Functions +
    - - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_shown_event + + glitchygames.engine.MouseManager.MouseProxy.__init__ -
    on_window_shown_event(event: Event) -> None
    +
    __init__(game: object = None) -> None
     
    -

    Handle the window shown event.

    +

    Initialize the mouse manager event proxy.

    @@ -14821,11 +6935,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The event to handle.

      +

      The game instance.

    @@ -14866,17 +6982,17 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_size_changed_event + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_motion_event -
    on_window_size_changed_event(event: Event) -> None
    +
    on_mouse_motion_event(event: Event) -> None
     
    -

    Handle the window size changed event.

    +

    Handle the mouse motion event.

    @@ -14936,17 +7052,17 @@
    - glitchygames.engine.WindowManager.WindowManagerProxy.on_window_take_focus_event + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_drag_event -
    on_window_take_focus_event(event: Event) -> None
    +
    on_mouse_drag_event(event: Event, trigger: Event) -> None
     
    -

    Handle the window take focus event.

    +

    Handle the mouse drag event.

    @@ -14968,6 +7084,14 @@
    Event) + – +
    +

    The triggering event.

    +
    + @@ -15002,32 +7126,21 @@
    Functions
    - -
    -
    - glitchygames.engine.WindowManager.__new__ + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_drop_event -
    -
    __new__(*args, **kwargs) -> object
    +
    +
    on_mouse_drop_event(event: Event, trigger: Event) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Handle the mouse drop event.

    @@ -15042,25 +7155,19 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args + event + (Event) –
      -

      The positional arguments.

      +

      The event to handle.

    • - **kwargs + trigger + (Event) –
      -

      The keyword arguments.

      +

      The triggering event.

    @@ -15081,10 +7188,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -15092,30 +7199,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    @@ -15125,18 +7208,17 @@
    -
    - glitchygames.engine.WindowManager.__getattr__ + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_drag_event -
    -
    __getattr__(attr: str) -> Callable
    +
    +
    on_left_mouse_drag_event(event: Event, trigger: Event) -> None
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +

    Handle the left mouse drag event.

    @@ -15151,11 +7233,19 @@
    • - attr - (str) + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) –
      -

      The attribute to get.

      +

      The triggering event.

    @@ -15176,10 +7266,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -15187,30 +7277,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    @@ -15220,17 +7286,17 @@
    -
    - glitchygames.engine.WindowManager.__init__ + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_drop_event -
    -
    __init__(game: object = None) -> None
    +
    +
    on_left_mouse_drop_event(event: Event, trigger: Event) -> None
     
    -

    Initialize the window event manager.

    +

    Handle the left mouse drop event.

    @@ -15245,13 +7311,19 @@
    • - game - (object, default: - None -) + event + (Event) –
      -

      The game instance.

      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

    @@ -15292,21 +7364,17 @@
    -
    - glitchygames.engine.WindowManager.args + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_drag_event - - - classmethod - -
    -
    args(parser: ArgumentParser) -> ArgumentParser
    +
    +
    on_middle_mouse_drag_event(event: Event, trigger: Event) -> None
     
    -

    Add window-specific arguments to the global parser.

    +

    Handle the middle mouse drag event.

    @@ -15321,11 +7389,19 @@
    • - parser - (ArgumentParser) + event + (Event) –
      -

      The argument parser.

      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

    @@ -15346,10 +7422,10 @@
    • - ArgumentParser + None
      -

      argparse.ArgumentParser

      +

      None

    @@ -15362,287 +7438,333 @@
    - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.engine.FontManager - - -

    - - -
    -

    - Bases: ResourceManager

    - - -

    A font manager.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.engine.FontManager.log - - - - class-attribute - instance-attribute - - -
    -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.FontManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    +
    -
    - glitchygames.engine.FontManager.proxies + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_drop_event - - - instance-attribute - -
    -
    proxies = []
    +
    +
    on_middle_mouse_drop_event(event: Event, trigger: Event) -> None
     
    -
    - -
    - -
    - - - -
    - glitchygames.engine.FontManager.OPTIONS - - - class-attribute - instance-attribute - - -
    -
    OPTIONS: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - +

    Handle the middle mouse drop event.

    -
    - glitchygames.engine.FontManager.RENDER_CACHE - - - class-attribute - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    -
    -
    RENDER_CACHE: ClassVar = {}
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    Classes
    -
    +
    -
    - glitchygames.engine.FontManager.FontProxy + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_drag_event -
    + +
    on_right_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    -

    - Bases: FontEvents, ResourceManager

    - -

    A font proxy.

    - +

    Handle the right mouse drag event.

    - -
    + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    +
    -Attributes -
    +
    - - glitchygames.engine.FontManager.FontProxy.log + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_drop_event - - - class-attribute - instance-attribute - -
    log: Logger = LOG
    +
    on_right_mouse_drop_event(event: Event, trigger: Event) -> None
     
    -
    - -
    - -
    - + +

    Handle the right mouse drop event.

    - - glitchygames.engine.FontManager.FontProxy.__instances__ - - - class-attribute - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    -
    -
    __instances__: ClassVar = {}
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    - - glitchygames.engine.FontManager.FontProxy.game - - - instance-attribute - + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_focus_event + -
    game = game
    +
    on_mouse_focus_event(event: Event, entering_focus: object) -> None
     
    -
    - -
    - -
    - + +

    Handle the mouse focus event.

    - - glitchygames.engine.FontManager.FontProxy.proxies - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + entering_focus + (object) + – +
      +

      The object entering focus.

      +
      +
    • +
    +
    -
    -
    proxies = [game, freetype]
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -Functions -
    - - glitchygames.engine.FontManager.FontProxy.__new__ + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_unfocus_event -
    __new__(*args, **kwargs) -> object
    +
    on_mouse_unfocus_event(event: Event, leaving_focus: object) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Handle the mouse unfocus event.

    @@ -15657,25 +7779,19 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args + event + (Event) –
      -

      The positional arguments.

      +

      The event to handle.

    • - **kwargs + leaving_focus + (object) –
      -

      The keyword arguments.

      +

      The object leaving focus.

    @@ -15696,10 +7812,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -15707,6 +7823,27 @@
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_button_up_event + + + +
    on_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse button up event.

    + @@ -15716,14 +7853,15 @@
    - +
    Raises:Parameters:
    • - AttributeError + event + (Event) –
      -

      If the event is not handled by any proxy.

      +

      The event to handle.

    @@ -15731,6 +7869,30 @@
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -15740,18 +7902,17 @@
    - - glitchygames.engine.FontManager.FontProxy.__getattr__ + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_button_up_event -
    __getattr__(attr: str) -> Callable
    +
    on_left_mouse_button_up_event(event: Event) -> None
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +

    Handle the left mouse button up event.

    @@ -15766,11 +7927,11 @@
    • - attr - (str) + event + (Event) –
      -

      The attribute to get.

      +

      The event to handle.

    @@ -15791,10 +7952,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -15802,6 +7963,27 @@
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_button_up_event + + + +
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the middle mouse button up event.

    + @@ -15811,14 +7993,15 @@
    - +
    Raises:Parameters:
    • - AttributeError + event + (Event) –
      -

      If the attribute is not found.

      +

      The event to handle.

    @@ -15826,31 +8009,30 @@
    -
    - -
    - - -
    - - - - - glitchygames.engine.FontManager.FontProxy.__subclasshook__ - - - classmethod - - - -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -15860,21 +8042,17 @@
    - - glitchygames.engine.FontManager.FontProxy.on_font_changed_event + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_button_up_event - - - abstractmethod - -
    on_font_changed_event(event: Event) -> None
    +
    on_right_mouse_button_up_event(event: Event) -> None
     
    -

    Handle font changed events.

    +

    Handle the right mouse button up event.

    @@ -15934,17 +8112,17 @@
    - - glitchygames.engine.FontManager.FontProxy.__init__ + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_button_down_event -
    __init__(game: object = None) -> None
    +
    on_mouse_button_down_event(event: Event) -> None
     
    -

    Initialize the font proxy.

    +

    Handle the mouse button down event.

    @@ -15959,13 +8137,11 @@
    • - game - (object, default: - None -) + event + (Event) –
      -

      The game object.

      +

      The event to handle.

    @@ -16002,32 +8178,21 @@
    - -
    - -
    - - -
    -
    Functions
    - -
    -
    - glitchygames.engine.FontManager.__new__ + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_button_down_event -
    -
    __new__(*args, **kwargs) -> object
    +
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Handle the left mouse button down event.

    @@ -16042,25 +8207,11 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs + event + (Event) –
      -

      The keyword arguments.

      +

      The event to handle.

    @@ -16081,10 +8232,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -16092,6 +8243,27 @@
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_button_down_event + + + +
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the middle mouse button down event.

    + @@ -16101,14 +8273,15 @@
    - +
    Raises:Parameters:
    • - AttributeError + event + (Event) –
      -

      If the event is not handled by any proxy.

      +

      The event to handle.

    @@ -16116,6 +8289,30 @@
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -16125,18 +8322,17 @@
    -
    - glitchygames.engine.FontManager.__getattr__ + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_button_down_event -
    -
    __getattr__(attr: str) -> Callable
    +
    +
    on_right_mouse_button_down_event(event: Event) -> None
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +

    Handle the right mouse button down event.

    @@ -16151,11 +8347,11 @@
    • - attr - (str) + event + (Event) –
      -

      The attribute to get.

      +

      The event to handle.

    @@ -16176,10 +8372,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -16187,30 +8383,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    @@ -16220,17 +8392,17 @@
    -
    - glitchygames.engine.FontManager.__init__ + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_scroll_down_event -
    -
    __init__(game: object = None) -> None
    +
    +
    on_mouse_scroll_down_event(event: Event) -> None
     
    -

    Initialize the font manager.

    +

    Handle the mouse scroll down event.

    @@ -16245,13 +8417,11 @@
    • - game - (object, default: - None -) + event + (Event) –
      -

      The game object.

      +

      The event to handle.

    @@ -16292,21 +8462,17 @@
    -
    - glitchygames.engine.FontManager.args + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_scroll_up_event - - - classmethod - -
    -
    args(parser: ArgumentParser) -> ArgumentParser
    +
    +
    on_mouse_scroll_up_event(event: Event) -> None
     
    -

    Add font options to the argument parser.

    +

    Handle the mouse scroll up event.

    @@ -16321,11 +8487,11 @@
    • - parser - (ArgumentParser) + event + (Event) –
      -

      The argument parser.

      +

      The event to handle.

    @@ -16346,10 +8512,10 @@
    • - ArgumentParser + None
      -

      argparse.ArgumentParser

      +

      None

    @@ -16366,26 +8532,17 @@
    -
    - glitchygames.engine.FontManager.font + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_wheel_event - - - classmethod - -
    -
    font(font_config: dict | None = None) -> Font | SysFont
    +
    +
    on_mouse_wheel_event(event: Event) -> None
     
    -

    Return a font object.

    -

    If the font requested can't be found then bitstream_vera will be loaded instead.

    -

    Note that if you are trying to package your game with pyinstaller, you'll need to bundle -your game's fonts with the pyinstaller invocation. Make sure you have distribution -rights to the fonts you're including with your game.

    -

    bitstream_vera is a permissively licensed font that can be used with your game.

    +

    Handle the mouse wheel event.

    @@ -16400,13 +8557,11 @@
    • - font_config - (dict | None, default: - None -) + event + (Event) –
      -

      The font configuration.

      +

      The event to handle.

    @@ -16427,343 +8582,221 @@
    • - Font | SysFont + None – -
      -

      pygame.freetype.Font | pygame.freetype.SysFont

      -
      -
    • -
    - - - - -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.engine.Scene - - -

    - - -
    -

    - Bases: SceneInterface, SpriteInterface, AllEventStubs

    - - -

    Scene object base class.

    -

    Subclass this to properly receive on_*_event() messages automatically.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.engine.Scene.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.Scene.FPS - - - - class-attribute - instance-attribute - - -
    -
    FPS = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.Scene.NAME - - - - class-attribute - instance-attribute - - -
    -
    NAME = 'Unnamed Scene'
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.Scene.VERSION - - - - class-attribute - instance-attribute - - -
    -
    VERSION = '0.0'
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.Scene.target_fps - - - - instance-attribute - - -
    -
    target_fps = 0
    -
    - -
    +
    +

    None

    +
    + + + + + +
    -
    - - -
    - glitchygames.engine.Scene.fps - - - - instance-attribute - -
    -
    fps = 0
    -
    +
    -
    +
    +
    Functions
    -
    +
    -
    - glitchygames.engine.Scene.dt - - - instance-attribute - +
    + glitchygames.engine.MouseManager.__init__ +
    -
    dt = 0
    +
    __init__(game: object = None) -> None
     
    -
    - -
    - -
    - + +

    Initialize the mouse manager.

    -
    - glitchygames.engine.Scene.dt_timer - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    -
    -
    dt_timer = 0
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.engine.Scene.dirty + +
    + glitchygames.engine.MouseManager.args - instance-attribute + classmethod
    -
    dirty = 1
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -
    - -
    - -
    - + +

    Add arguments to the argument parser.

    -
    - glitchygames.engine.Scene.options - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    -
    -
    options = options
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      None

      +
      +
    • +
    +
    -
    - - - -
    - glitchygames.engine.Scene.scene_manager - - - instance-attribute - -
    -
    scene_manager = SceneManager()
    -
    +
    -
    +
    -
    +
    -
    - glitchygames.engine.Scene.name +

    + glitchygames.engine.TouchManager - - - instance-attribute - -

    -
    name = type(self)
    -
    +
    +
    -
    +

    + Bases: ResourceManager

    -
    + +

    Touch event manager.

    -
    + +
    -
    - glitchygames.engine.Scene.next_scene - - - instance-attribute - -
    -
    next_scene = self
    -
    -
    -
    -
    +
    Attributes
    -
    - glitchygames.engine.Scene.rects +
    + glitchygames.engine.TouchManager.proxies @@ -16771,70 +8804,58 @@
    -
    rects = None
    +
    proxies = [TouchProxy(game=game)]
     
    +
    Classes
    -
    +
    -
    - glitchygames.engine.Scene.screen +
    + glitchygames.engine.TouchManager.TouchProxy - - - instance-attribute -
    -
    screen = get_surface()
    -
    +
    -
    +

    + Bases: TouchEvents, ResourceManager

    -
    + +

    Touch event proxy.

    -
    + +
    -
    - glitchygames.engine.Scene.screen_width - - - instance-attribute - -
    -
    screen_width = get_width()
    -
    -
    -
    -
    +Attributes
    -
    - glitchygames.engine.Scene.screen_height + + glitchygames.engine.TouchManager.TouchProxy.fingers instance-attribute -
    -
    screen_height = get_height()
    +
    +
    fingers: dict = {}
     
    @@ -16846,16 +8867,16 @@
    -
    - glitchygames.engine.Scene.all_sprites + + glitchygames.engine.TouchManager.TouchProxy.game instance-attribute -
    -
    all_sprites = groups
    +
    +
    game: object = game
     
    @@ -16867,16 +8888,16 @@
    -
    - glitchygames.engine.Scene.background + + glitchygames.engine.TouchManager.TouchProxy.proxies instance-attribute -
    -
    background = Surface(get_size())
    +
    +
    proxies: list = [game, touch]
     
    @@ -16884,28 +8905,53 @@
    -
    +Functions +
    -
    - glitchygames.engine.Scene.background_color - - - property - writable - -
    -
    background_color: Color
    +
    +          glitchygames.engine.TouchManager.TouchProxy.__init__
    +
    +
    +
    +
    __init__(game: object = None) -> None
     
    -

    Return the background color.

    +

    Initialize the finger event proxy.

    + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + @@ -16918,82 +8964,203 @@
    -
    • - Color + None
      -

      pygame.Color: The background color.

      +

      None

    + +
    -
    +
    -
    - glitchygames.engine.Scene.image - - - instance-attribute - + + glitchygames.engine.TouchManager.TouchProxy.on_touch_down_event -
    -
    image = screen
    +
    +
    +
    on_touch_down_event(event: Event) -> None
     
    + +

    Handle finger down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.engine.Scene.rect - - - instance-attribute - + + glitchygames.engine.TouchManager.TouchProxy.on_touch_motion_event -
    -
    rect = get_rect()
    +
    +
    +
    on_touch_motion_event(event: Event) -> None
     
    + +

    Handle finger motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.engine.Scene.screenshot - - - property - + + glitchygames.engine.TouchManager.TouchProxy.on_touch_up_event -
    -
    screenshot: Surface
    +
    +
    +
    on_touch_up_event(event: Event) -> None
     
    -

    Return a screenshot of the scene.

    +

    Handle finger up events.

    + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    @@ -17007,43 +9174,87 @@
    -
    • - Surface + None
      -

      pygame.Surface: The scene screenshot.

      +

      None

    + +
    -
    Functions
    -
    -
    - glitchygames.engine.Scene.__subclasshook__ + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_down_event - - - classmethod - -
    -
    __subclasshook__(subclass: object) -> bool
    +
    +
    on_multi_touch_down_event(event: Event) -> None
     
    -

    Override the default subclasshook to create an interface.

    +

    Handle multi-touch down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -17053,21 +9264,17 @@
    -
    - glitchygames.engine.Scene.on_mouse_motion_event + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_motion_event - - - cached - -
    -
    on_mouse_motion_event(event: Event) -> None
    +
    +
    on_multi_touch_motion_event(event: Event) -> None
     
    -

    Handle mouse motion events.

    +

    Handle multi-touch motion events.

    @@ -17127,21 +9334,17 @@
    - glitchygames.engine.Scene.on_mouse_focus_event + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_up_event - - - cached - -
    -
    on_mouse_focus_event(event: Event, entering_focus: object) -> None
    +
    +
    on_multi_touch_up_event(event: Event) -> None
     
    -

    Handle mouse focus events.

    +

    Handle multi-touch up events.

    @@ -17163,14 +9366,6 @@

    The event to handle.

    -
  • - entering_focus - (object) - – -
    -

    The object that is entering focus.

    -
    -
  • @@ -17205,25 +9400,31 @@
    + +
    + +
    + + +
    +
    Functions
    + +
    -
    - glitchygames.engine.Scene.on_mouse_unfocus_event +
    + glitchygames.engine.TouchManager.__init__ - - - cached -
    -
    on_mouse_unfocus_event(event: Event, leaving_focus: object) -> None
    +
    __init__(game: object = None) -> None
     
    -

    Handle mouse unfocus events.

    +

    Initialize the touch event manager.

    @@ -17238,19 +9439,13 @@
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - leaving_focus - (object) + game + (object, default: + None +) –
      -

      The object that is leaving focus.

      +

      The game object.

    @@ -17287,99 +9482,154 @@
    +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.WindowManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Window manager event handler.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.WindowManager.proxies + + + + instance-attribute + + +
    +
    proxies = [WindowManagerProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.WindowManager.WindowManagerProxy + + +
    + + +
    +

    + Bases: WindowEvents, ResourceManager

    + + +

    Window manager event proxy.

    + + + + +
    -
    - glitchygames.engine.Scene.on_mouse_button_up_event + + + +Attributes + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.proxies - cached + instance-attribute -
    -
    on_mouse_button_up_event(event: Event) -> None
    +
    +
    proxies = [game]
     
    - -

    Handle mouse button up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +Functions +
    -
    - glitchygames.engine.Scene.on_mouse_button_down_event + + glitchygames.engine.WindowManager.WindowManagerProxy.__init__ - - - cached - -
    -
    on_mouse_button_down_event(event: Event) -> None
    +
    +
    __init__(game: object = None) -> None
     
    -

    Handle mouse button down events.

    +

    Initialize the window manager proxy.

    @@ -17394,11 +9644,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The event to handle.

      +

      The game instance.

    @@ -17439,21 +9691,17 @@
    - glitchygames.engine.Scene.on_mouse_scroll_down_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_close_event - - - cached - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    +
    +
    on_window_close_event(event: Event) -> None
     
    -

    Handle mouse scroll down events.

    +

    Handle the window close event.

    @@ -17513,21 +9761,17 @@
    - glitchygames.engine.Scene.on_mouse_scroll_up_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_enter_event - - - cached - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    +
    +
    on_window_enter_event(event: Event) -> None
     
    -

    Handle mouse scroll up events.

    +

    Handle the window enter event.

    @@ -17587,21 +9831,17 @@
    - glitchygames.engine.Scene.on_mouse_wheel_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_exposed_event - - - cached - -
    -
    on_mouse_wheel_event(event: Event) -> None
    +
    +
    on_window_exposed_event(event: Event) -> None
     
    -

    Handle mouse wheel events.

    +

    Handle the window exposed event.

    @@ -17661,21 +9901,17 @@
    -
    - glitchygames.engine.Scene.on_key_down_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_focus_gained_event - - - cached - -
    -
    on_key_down_event(event: Event) -> None
    +
    +
    on_window_focus_gained_event(event: Event) -> None
     
    -

    Handle key down events.

    +

    Handle the window focus gained event.

    @@ -17735,21 +9971,17 @@
    -
    - glitchygames.engine.Scene.on_key_chord_up_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_focus_lost_event - - - cached - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    +
    +
    on_window_focus_lost_event(event: Event) -> None
     
    -

    Handle key chord up events.

    +

    Handle the window focus lost event.

    @@ -17771,14 +10003,6 @@
    The event to handle.

    -
  • - keys - (list) - – -
    -

    The keys in the chord.

    -
    -
  • @@ -17817,21 +10041,17 @@
    - glitchygames.engine.Scene.on_key_chord_down_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_hidden_event - - - cached - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    +
    +
    on_window_hidden_event(event: Event) -> None
     
    -

    Handle key chord down events.

    +

    Handle the window hidden event.

    @@ -17853,14 +10073,6 @@
    -

    The keys in the chord.

    -
    - @@ -17899,21 +10111,17 @@
    - glitchygames.engine.Scene.on_joy_axis_motion_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_hit_test_event - - - cached - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    +
    +
    on_window_hit_test_event(event: Event) -> None
     
    -

    Handle joystick axis motion events.

    +

    Handle the window hit test event.

    @@ -17973,21 +10181,17 @@
    - glitchygames.engine.Scene.on_joy_hat_motion_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_leave_event - - - cached - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    +
    +
    on_window_leave_event(event: Event) -> None
     
    -

    Handle joystick hat motion events.

    +

    Handle the window leave event.

    @@ -18047,21 +10251,17 @@
    - glitchygames.engine.Scene.on_joy_ball_motion_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_maximized_event - - - cached - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    +
    +
    on_window_maximized_event(event: Event) -> None
     
    -

    Handle joystick ball motion events.

    +

    Handle the window maximized event.

    @@ -18121,21 +10321,17 @@
    - glitchygames.engine.Scene.on_joy_device_added_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_minimized_event - - - cached - -
    -
    on_joy_device_added_event(event: Event) -> None
    +
    +
    on_window_minimized_event(event: Event) -> None
     
    -

    Handle joystick device added events.

    +

    Handle the window minimized event.

    @@ -18195,21 +10391,17 @@
    - glitchygames.engine.Scene.on_joy_device_removed_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_moved_event - - - cached - -
    -
    on_joy_device_removed_event(event: Event) -> None
    +
    +
    on_window_moved_event(event: Event) -> None
     
    -

    Handle joystick device removed events.

    +

    Handle the window moved event.

    @@ -18269,21 +10461,17 @@
    - glitchygames.engine.Scene.on_active_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_resized_event - - - cached - -
    -
    on_active_event(event: Event) -> None
    +
    +
    on_window_resized_event(event: Event) -> None
     
    -

    Handle active events.

    +

    Handle the window resized event.

    @@ -18343,21 +10531,17 @@
    -
    - glitchygames.engine.Scene.on_game_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_restored_event - - - cached - -
    -
    on_game_event(event: Event) -> None
    +
    +
    on_window_restored_event(event: Event) -> None
     
    -

    Handle game events.

    +

    Handle the window restored event.

    @@ -18417,21 +10601,17 @@
    -
    - glitchygames.engine.Scene.on_menu_item_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_shown_event - - - cached - -
    -
    on_menu_item_event(event: Event) -> None
    +
    +
    on_window_shown_event(event: Event) -> None
     
    -

    Handle menu item events.

    +

    Handle the window shown event.

    @@ -18491,21 +10671,17 @@
    -
    - glitchygames.engine.Scene.on_font_changed_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_size_changed_event - - - cached - -
    -
    on_font_changed_event(event: Event) -> None
    +
    +
    on_window_size_changed_event(event: Event) -> None
     
    -

    Handle font changed events.

    +

    Handle the window size changed event.

    @@ -18565,21 +10741,17 @@
    - glitchygames.engine.Scene.on_multi_touch_down_event + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_take_focus_event - - - cached - -
    -
    on_multi_touch_down_event(event: Event) -> None
    +
    +
    on_window_take_focus_event(event: Event) -> None
     
    -

    Handle multi finger down event.

    +

    Handle the window take focus event.

    @@ -18598,7 +10770,7 @@
    Event) –
    -

    The pygame event.

    +

    The event to handle.

    @@ -18635,25 +10807,31 @@
    Functions
    + +
    -
    - glitchygames.engine.Scene.on_multi_touch_motion_event +
    + glitchygames.engine.WindowManager.__init__ - - - cached -
    -
    on_multi_touch_motion_event(event: Event) -> None
    +
    __init__(game: object = None) -> None
     
    -

    Handle multi finger motion event.

    +

    Initialize the window event manager.

    @@ -18668,11 +10846,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The pygame event.

      +

      The game instance.

    @@ -18713,21 +10893,21 @@
    - glitchygames.engine.Scene.on_multi_touch_up_event +
    + glitchygames.engine.WindowManager.args - cached + classmethod
    -
    on_multi_touch_up_event(event: Event) -> None
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -

    Handle multi finger up event.

    +

    Add window-specific arguments to the global parser.

    @@ -18742,11 +10922,11 @@
    • - event - (Event) + parser + (ArgumentParser) –
      -

      The pygame event.

      +

      The argument parser.

    @@ -18767,10 +10947,10 @@
    • - None + ArgumentParser
      -

      None

      +

      argparse.ArgumentParser

    @@ -18783,25 +10963,177 @@
    + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.FontManager + + +

    +
    +

    + Bases: ResourceManager

    + + +

    A font manager.

    + + + + +
    + + + + + +
    Attributes
    + +
    + -
    - glitchygames.engine.Scene.on_drop_begin_event + +
    + glitchygames.engine.FontManager.OPTIONS - cached + class-attribute + instance-attribute
    -
    on_drop_begin_event(event: Event) -> None
    +
    OPTIONS: ClassVar = {}
     
    +
    + +
    + +
    + + + +
    + glitchygames.engine.FontManager.RENDER_CACHE + -

    Handle drop begin event.

    + + class-attribute + instance-attribute + + +
    +
    RENDER_CACHE: ClassVar = {}
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.FontManager.FontProxy + + +
    + + +
    +

    + Bases: FontEvents, ResourceManager

    + + +

    A font proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.FontManager.FontProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.FontManager.FontProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, freetype]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.FontManager.FontProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the font proxy.

    @@ -18816,11 +11148,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The pygame event.

      +

      The game object.

    @@ -18857,25 +11191,31 @@
    + +
    + +
    + + +
    +
    Functions
    + +
    -
    - glitchygames.engine.Scene.on_drop_file_event +
    + glitchygames.engine.FontManager.__init__ - - - cached -
    -
    on_drop_file_event(event: Event) -> None
    +
    __init__(game: object = None) -> None
     
    -

    Handle drop file event.

    +

    Initialize the font manager.

    @@ -18890,11 +11230,13 @@
    • - event - (Event) + game + (object, default: + None +) –
      -

      The pygame event.

      +

      The game object.

    @@ -18935,21 +11277,21 @@
    -
    - glitchygames.engine.Scene.on_drop_text_event +
    + glitchygames.engine.FontManager.args - cached + classmethod
    -
    on_drop_text_event(event: Event) -> None
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -

    Handle drop text event.

    +

    Add font options to the argument parser.

    @@ -18964,11 +11306,11 @@
    • - event - (Event) + parser + (ArgumentParser) –
      -

      The pygame event.

      +

      The argument parser.

    @@ -18989,10 +11331,10 @@
    • - None + ArgumentParser
      -

      None

      +

      argparse.ArgumentParser

    @@ -19009,21 +11351,26 @@
    -
    - glitchygames.engine.Scene.on_drop_complete_event +
    + glitchygames.engine.FontManager.font - cached + classmethod
    -
    on_drop_complete_event(event: Event) -> None
    +
    font(font_config: dict | None = None) -> Font | SysFont
     
    -

    Handle drop complete event.

    +

    Return a font object.

    +

    If the font requested can't be found then bitstream_vera will be loaded instead.

    +

    Note that if you are trying to package your game with pyinstaller, you'll need to bundle +your game's fonts with the pyinstaller invocation. Make sure you have distribution +rights to the fonts you're including with your game.

    +

    bitstream_vera is a permissively licensed font that can be used with your game.

    @@ -19038,11 +11385,13 @@
    • - event - (Event) + font_config + (dict | None, default: + None +) –
      -

      The pygame event.

      +

      The font configuration.

    @@ -19063,10 +11412,10 @@
    • - None + Font | SysFont
      -

      None

      +

      pygame.freetype.Font | pygame.freetype.SysFont

    @@ -19078,496 +11427,469 @@
    + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.Scene + + +

    + + +
    +

    + Bases: SceneInterface, SpriteInterface, AllEventStubs

    + + +

    Scene object base class.

    +

    Subclass this to properly receive on_*_event() messages automatically.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.Scene.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.FPS + + + + class-attribute + instance-attribute + + +
    +
    FPS = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.NAME + + + + class-attribute + instance-attribute + + +
    +
    NAME = 'Unnamed Scene'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.VERSION + + + + class-attribute + instance-attribute + + +
    +
    VERSION = '0.0'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.target_fps + + + + instance-attribute + + +
    +
    target_fps = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.fps + + + + instance-attribute + + +
    +
    fps = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dt + + + + instance-attribute + + +
    +
    dt = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dt_timer + + + + instance-attribute + + +
    +
    dt_timer = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dirty + + + + instance-attribute + + +
    +
    dirty = 1
    +
    + +
    +
    + +
    + +
    -
    - glitchygames.engine.Scene.on_controller_axis_motion_event +
    + glitchygames.engine.Scene.options - cached + instance-attribute
    -
    on_controller_axis_motion_event(event: Event) -> None
    +
    options = options
     
    - -

    Handle controller axis motion events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    - -
    +
    -
    - glitchygames.engine.Scene.on_controller_device_added_event +
    + glitchygames.engine.Scene.scene_manager - cached + instance-attribute
    -
    on_controller_device_added_event(event: Event) -> None
    +
    scene_manager = SceneManager()
     
    - -

    Handle controller device added events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    - -
    +
    -
    - glitchygames.engine.Scene.on_controller_device_remapped_event +
    + glitchygames.engine.Scene.name - cached + instance-attribute
    -
    on_controller_device_remapped_event(event: Event) -> None
    +
    name = type(self)
     
    - -

    Handle controller device remapped events.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.engine.Scene.next_scene + + + + instance-attribute + + +
    +
    next_scene = self
    +
    + +
    - -
    +
    -
    - glitchygames.engine.Scene.on_controller_device_removed_event +
    + glitchygames.engine.Scene.rects - cached + instance-attribute
    -
    on_controller_device_removed_event(event: Event) -> None
    +
    rects = None
     
    - -

    Handle controller device removed events.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.engine.Scene.screen + + + + instance-attribute + + +
    +
    screen = get_surface()
    +
    + +
    - -
    +
    -
    - glitchygames.engine.Scene.on_controller_touchpad_down_event +
    + glitchygames.engine.Scene.screen_width - cached + instance-attribute
    -
    on_controller_touchpad_down_event(event: Event) -> None
    +
    screen_width = get_width()
     
    - -

    Handle controller touchpad down events.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.engine.Scene.screen_height + + + + instance-attribute + + +
    +
    screen_height = get_height()
    +
    + +
    - -
    +
    -
    - glitchygames.engine.Scene.on_controller_touchpad_motion_event +
    + glitchygames.engine.Scene.all_sprites - cached + instance-attribute
    -
    on_controller_touchpad_motion_event(event: Event) -> None
    +
    all_sprites = groups
     
    - -

    Handle controller touchpad motion events.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.engine.Scene.background + + + + instance-attribute + + +
    +
    background = Surface(get_size())
    +
    + +
    - -
    +
    -
    - glitchygames.engine.Scene.on_controller_touchpad_up_event +
    + glitchygames.engine.Scene.background_color - cached + property + writable
    -
    on_controller_touchpad_up_event(event: Event) -> None
    +
    background_color: Color
     
    -

    Handle controller touchpad up events.

    - - +

    Return the background color.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -19581,141 +11903,82 @@
    • - None + Color
      -

      None

      +

      pygame.Color: The background color.

    -
    -
    +
    - -
    +
    -
    - glitchygames.engine.Scene.on_audio_device_added_event +
    + glitchygames.engine.Scene.image - cached + instance-attribute
    -
    on_audio_device_added_event(event: Event) -> None
    +
    image = screen
     
    - -

    Handle audio device added events.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.engine.Scene.rect + + + + instance-attribute + + +
    +
    rect = get_rect()
    +
    + +
    - -
    +
    -
    - glitchygames.engine.Scene.on_audio_device_removed_event +
    + glitchygames.engine.Scene.screenshot - cached + property
    -
    on_audio_device_removed_event(event: Event) -> None
    +
    screenshot: Surface
     
    -

    Handle audio device removed events.

    - - +

    Return a screenshot of the scene.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -19729,21 +11992,22 @@
    • - None + Surface
      -

      None

      +

      pygame.Surface: The scene screenshot.

    -
    -
    +
    +
    Functions
    +
    @@ -23429,323 +15693,132 @@
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.engine.Scene.load_resources - - -
    -
    load_resources() -> None
    -
    - -
    - -

    Load the scene's resources.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.engine.SceneManager - - -

    - - -
    -

    - Bases: SceneInterface, EventManager

    - - -

    Glitchy Games Scene Manager.

    -

    The scene manager is responsible for managing the active scene, -and for processing events.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.engine.SceneManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.SceneManager.proxies - - - - instance-attribute - - -
    -
    proxies = [EventProxy(event_source=self)]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.SceneManager.log - - - - class-attribute - instance-attribute - - -
    -
    log: ClassVar = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.SceneManager.OPTIONS - - - - class-attribute - instance-attribute - - -
    -
    OPTIONS: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.SceneManager.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.engine.SceneManager.update_type - - - instance-attribute - +
    + glitchygames.engine.Scene.load_resources +
    -
    update_type = 'update'
    +
    load_resources() -> None
     
    -
    + +

    Load the scene's resources.

    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    +
    -
    - glitchygames.engine.SceneManager.fps_refresh_rate - - - instance-attribute - -
    -
    fps_refresh_rate = 1000
    -
    +
    -
    +
    -
    +
    -
    - glitchygames.engine.SceneManager.target_fps +

    + glitchygames.engine.SceneManager - - - instance-attribute - -

    -
    target_fps = 0
    -
    +
    +
    -
    +

    + Bases: SceneInterface, EventManager

    -
    + +

    Glitchy Games Scene Manager.

    +

    The scene manager is responsible for managing the active scene, +and for processing events.

    -
    + +
    -
    - glitchygames.engine.SceneManager.dt - - - instance-attribute - -
    -
    dt = 0
    -
    -
    -
    -
    +
    Attributes
    -
    - glitchygames.engine.SceneManager.timer +
    + glitchygames.engine.SceneManager.log + class-attribute instance-attribute
    -
    timer = 0
    +
    log: ClassVar = LOG
     
    @@ -23757,16 +15830,17 @@
    -
    - glitchygames.engine.SceneManager.active_scene +
    + glitchygames.engine.SceneManager.OPTIONS + class-attribute instance-attribute
    -
    active_scene = None
    +
    OPTIONS: ClassVar = {}
     
    @@ -23778,8 +15852,8 @@
    -
    - glitchygames.engine.SceneManager.next_scene +
    + glitchygames.engine.SceneManager.screen @@ -23787,7 +15861,7 @@
    -
    next_scene = active_scene
    +
    screen = get_surface()
     
    @@ -23799,8 +15873,8 @@
    -
    - glitchygames.engine.SceneManager.previous_scene +
    + glitchygames.engine.SceneManager.update_type @@ -23808,7 +15882,7 @@
    -
    previous_scene = active_scene
    +
    update_type = 'update'
     
    @@ -23820,8 +15894,8 @@
    - glitchygames.engine.SceneManager.quit_requested +
    + glitchygames.engine.SceneManager.fps_refresh_rate @@ -23829,7 +15903,7 @@
    -
    quit_requested = False
    +
    fps_refresh_rate = 1000
     
    @@ -23841,8 +15915,8 @@
    - glitchygames.engine.SceneManager.clock +
    + glitchygames.engine.SceneManager.target_fps @@ -23850,7 +15924,7 @@
    -
    clock = Clock()
    +
    target_fps = 0
     
    @@ -23862,47 +15936,20 @@
    -
    - glitchygames.engine.SceneManager.game_engine +
    + glitchygames.engine.SceneManager.dt - property - writable + instance-attribute
    -
    game_engine: object
    +
    dt = 0
     
    - -

    Return the game engine.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -object( object -) – -
      -

      The game engine.

      -
      -
    • -
    -
    +
    @@ -23910,92 +15957,37 @@
    -
    - glitchygames.engine.SceneManager.all_sprites - - - - property - - -
    -
    all_sprites: LayeredDirty | None
    -
    - -
    - -

    Return the active scene's sprite group.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - LayeredDirty | None - – -
      -

      pygame.sprite.LayeredDirty | None: The active scene's sprite group.

      -
      -
    • -
    -
    - -
    -
    Classes
    - -
    - - - -
    - glitchygames.engine.SceneManager.EventProxy - - -
    - - -
    - - -

    Proxy for events.

    - +
    + glitchygames.engine.SceneManager.timer + + instance-attribute + -
    - - - +
    +
    timer = 0
    +
    +
    +
    -Attributes +
    - - glitchygames.engine.SceneManager.EventProxy.log +
    + glitchygames.engine.SceneManager.active_scene - class-attribute instance-attribute - -
    log: Logger = LOG
    +
    +
    active_scene = None
     
    @@ -24007,16 +15999,16 @@
    - - glitchygames.engine.SceneManager.EventProxy.proxies +
    + glitchygames.engine.SceneManager.next_scene instance-attribute - -
    proxies = []
    +
    +
    next_scene = active_scene
     
    @@ -24028,16 +16020,16 @@
    - - glitchygames.engine.SceneManager.EventProxy.event_source +
    + glitchygames.engine.SceneManager.previous_scene instance-attribute - -
    event_source = event_source
    +
    +
    previous_scene = active_scene
     
    @@ -24045,197 +16037,69 @@
    -Functions - - -
    +
    - - glitchygames.engine.SceneManager.EventProxy.__init__ +
    + glitchygames.engine.SceneManager.quit_requested + + + instance-attribute + - -
    __init__(event_source: object) -> None
    +
    +
    quit_requested = False
     
    - -

    Initialize the event proxy.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event_source - (object) - – -
      -

      The event source.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    - -
    +
    - - glitchygames.engine.SceneManager.EventProxy.unhandled_event +
    + glitchygames.engine.SceneManager.clock + + + instance-attribute + - -
    unhandled_event(*args, **kwargs) -> None
    +
    +
    clock = Clock()
     
    - -

    Handle unhandled events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    - -
    +
    - - glitchygames.engine.SceneManager.EventProxy.__getattr__ +
    + glitchygames.engine.SceneManager.game_engine + + + property + writable + - -
    __getattr__(attr: str) -> Callable
    +
    +
    game_engine: object
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    - - +

    Return the game engine.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    @@ -24249,88 +16113,40 @@
    -
    • - Callable - – +object( object +) –
      -

      The attribute.

      +

      The game engine.

    -
    - -
    - - - -
    - -
    - +
    -
    Functions
    - - -
    - - - -
    - glitchygames.engine.SceneManager.__new__ - - -
    -
    __new__(*args, **kwargs) -> object
    -
    - -
    - -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    + +
    + glitchygames.engine.SceneManager.all_sprites + + + + property + + +
    +
    all_sprites: LayeredDirty | None
    +
    + +
    + +

    Return the active scene's sprite group.

    + @@ -24344,45 +16160,22 @@
    -
    • - object + LayeredDirty | None
      -

      The new instance of the class.

      +

      pygame.sprite.LayeredDirty | None: The active scene's sprite group.

    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    +
    +
    Functions
    +
    @@ -25578,31 +17371,6 @@
    Functions
    -
    - glitchygames.engine.Sprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.engine.Sprite.break_when @@ -29536,28 +21304,6 @@
    Attributes
    -
    - glitchygames.engine.GameManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - -
    glitchygames.engine.GameManager.log @@ -29631,28 +21377,6 @@
    - - glitchygames.engine.GameManager.GameProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - glitchygames.engine.GameManager.GameProxy.log @@ -29696,229 +21420,25 @@
    - - glitchygames.engine.GameManager.GameProxy.proxies - - - - instance-attribute - - - -
    proxies = [game]
    -
    - -
    -
    - -
    - -Functions - - -
    - - - - - glitchygames.engine.GameManager.GameProxy.__new__ - - - -
    __new__(*args, **kwargs) -> object
    -
    - -
    - -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - object - – -
      -

      The new instance of the class.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.engine.GameManager.GameProxy.__getattr__ - - - -
    __getattr__(attr: str) -> Callable
    -
    - -
    - -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    - + + glitchygames.engine.GameManager.GameProxy.proxies - - - - - - - - - - - -
    Returns: -
      -
    • - Callable - – -
      -

      The attribute.

      -
      -
    • -
    -
    + + + instance-attribute + +
    +
    proxies = [game]
    +
    - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    +
    +Functions +
    @@ -30595,236 +22115,22 @@
    - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    -
    Functions
    - - -
    - - - -
    - glitchygames.engine.GameManager.__new__ - - -
    -
    __new__(*args, **kwargs) -> object
    -
    - -
    - -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - object - – -
      -

      The new instance of the class.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.engine.GameManager.__getattr__ - - -
    -
    __getattr__(attr: str) -> Callable
    -
    - -
    - -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - Callable - – -
      -

      The attribute.

      -
      -
    • -
    -
    - - - - - - - - - - - + + + + + +
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -30833,6 +22139,16 @@
    + +
    + +
    + + +
    +
    Functions
    + +
    @@ -30999,277 +22315,36 @@

    -

    - Bases: EventManager

    - - -

    Glitchy Games' Game engine.

    -

    The game engine is responsible for initializing pygame and -handling events. It also provides a number of helper methods -for common tasks such as setting the screen resolution and -setting the cursor.

    -

    Every Glitchy Game game inherits the GameEngine command line -options, so you can add your own command line options by -implementing the args() class method in your Scene class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.engine.GameEngine.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.proxies - - - - instance-attribute - - -
    -
    proxies = [EventProxy(event_source=self)]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.log - - - - class-attribute - instance-attribute - - -
    -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.game - - - - class-attribute - instance-attribute - - -
    -
    game: object = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.icon - - - - class-attribute - instance-attribute - - -
    -
    icon: Surface = load(Path(ASSET_PATH) / 'glitch.png')
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.NAME - - - - class-attribute - instance-attribute - - -
    -
    NAME: Literal['Boilerplate Adventures'] = 'Boilerplate Adventures'
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.VERSION - - - - class-attribute - instance-attribute - - -
    -
    VERSION: Literal['1.0'] = '1.0'
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.OPTIONS - - - - class-attribute - instance-attribute - - -
    -
    OPTIONS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.LAST_EVENT_MISS - - - - class-attribute - instance-attribute - - -
    -
    LAST_EVENT_MISS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.engine.GameEngine.MISSING_EVENTS - - - - class-attribute - instance-attribute - - -
    -
    MISSING_EVENTS: ClassVar = []
    -
    - -
    -
    +

    + Bases: EventManager

    -
    + +

    Glitchy Games' Game engine.

    +

    The game engine is responsible for initializing pygame and +handling events. It also provides a number of helper methods +for common tasks such as setting the screen resolution and +setting the cursor.

    +

    Every Glitchy Game game inherits the GameEngine command line +options, so you can add your own command line options by +implementing the args() class method in your Scene class.

    -
    + +
    -
    - glitchygames.engine.GameEngine.UNIMPLEMENTED_EVENTS - - - class-attribute - instance-attribute - -
    -
    UNIMPLEMENTED_EVENTS: ClassVar = []
    -
    -
    -
    -
    +
    Attributes
    -
    - glitchygames.engine.GameEngine.USE_FASTEVENTS +
    + glitchygames.engine.GameEngine.log @@ -31278,7 +22353,7 @@
    -
    USE_FASTEVENTS: ClassVar = False
    +
    log: Logger = LOG
     
    @@ -31290,8 +22365,8 @@
    -
    - glitchygames.engine.GameEngine.EVENT_HANDLERS +
    + glitchygames.engine.GameEngine.game @@ -31300,7 +22375,7 @@
    -
    EVENT_HANDLERS: ClassVar = {}
    +
    game: object = None
     
    @@ -31312,16 +22387,17 @@
    -
    - glitchygames.engine.GameEngine.fps +
    + glitchygames.engine.GameEngine.icon + class-attribute instance-attribute
    -
    fps: float = get('fps', 0.0)
    +
    icon: Surface = load(Path(ASSET_PATH) / 'glitch.png')
     
    @@ -31333,16 +22409,17 @@
    -
    - glitchygames.engine.GameEngine.update_type +
    + glitchygames.engine.GameEngine.NAME + class-attribute instance-attribute
    -
    update_type = get('update_type')
    +
    NAME: Literal['Boilerplate Adventures'] = 'Boilerplate Adventures'
     
    @@ -31354,16 +22431,17 @@
    -
    - glitchygames.engine.GameEngine.use_gfxdraw +
    + glitchygames.engine.GameEngine.VERSION + class-attribute instance-attribute
    -
    use_gfxdraw = get('use_gfxdraw')
    +
    VERSION: Literal['1.0'] = '1.0'
     
    @@ -31375,16 +22453,17 @@
    -
    - glitchygames.engine.GameEngine.windowed +
    + glitchygames.engine.GameEngine.OPTIONS + class-attribute instance-attribute
    -
    windowed = get('windowed')
    +
    OPTIONS: ClassVar = None
     
    @@ -31396,16 +22475,17 @@
    -
    - glitchygames.engine.GameEngine.fps_refresh_rate +
    + glitchygames.engine.GameEngine.LAST_EVENT_MISS + class-attribute instance-attribute
    -
    fps_refresh_rate = get('fps_refresh_rate')
    +
    LAST_EVENT_MISS: ClassVar = None
     
    @@ -31417,16 +22497,17 @@
    - glitchygames.engine.GameEngine.pygame_version +
    + glitchygames.engine.GameEngine.MISSING_EVENTS + class-attribute instance-attribute
    -
    pygame_version = {'major': 0, 'minor': 0, 'patch': 0}
    +
    MISSING_EVENTS: ClassVar = []
     
    @@ -31438,16 +22519,17 @@
    -
    - glitchygames.engine.GameEngine.scene_manager +
    + glitchygames.engine.GameEngine.UNIMPLEMENTED_EVENTS + class-attribute instance-attribute
    -
    scene_manager: SceneManager = SceneManager()
    +
    UNIMPLEMENTED_EVENTS: ClassVar = []
     
    @@ -31459,16 +22541,17 @@
    -
    - glitchygames.engine.GameEngine.mode_flags +
    + glitchygames.engine.GameEngine.USE_FASTEVENTS + class-attribute instance-attribute
    -
    mode_flags: int = 0
    +
    USE_FASTEVENTS: ClassVar = False
     
    @@ -31480,16 +22563,17 @@
    -
    - glitchygames.engine.GameEngine.desired_resolution +
    + glitchygames.engine.GameEngine.EVENT_HANDLERS + class-attribute instance-attribute
    -
    desired_resolution: tuple[int, int] = suggested_resolution(desired_width, desired_height)
    +
    EVENT_HANDLERS: ClassVar = {}
     
    @@ -31501,46 +22585,20 @@
    - glitchygames.engine.GameEngine.screen_width +
    + glitchygames.engine.GameEngine.fps - property + instance-attribute
    -
    screen_width: int
    +
    fps: float = get('fps', 0.0)
     
    - -

    Get the screen width.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The screen width.

      -
      -
    • -
    -
    +
    @@ -31548,92 +22606,37 @@
    -
    - glitchygames.engine.GameEngine.screen_height +
    + glitchygames.engine.GameEngine.update_type - property + instance-attribute
    -
    screen_height: int
    +
    update_type = get('update_type')
     
    - -

    Get the screen height.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The screen height.

      -
      -
    • -
    -
    +
    -
    Classes
    - -
    - - - -
    - glitchygames.engine.GameEngine.EventProxy - - -
    - - -
    - - -

    Proxy for events.

    - - - - -
    - - - - - -Attributes
    - - glitchygames.engine.GameEngine.EventProxy.log +
    + glitchygames.engine.GameEngine.use_gfxdraw - class-attribute instance-attribute - -
    log: Logger = LOG
    +
    +
    use_gfxdraw = get('use_gfxdraw')
     
    @@ -31645,16 +22648,16 @@
    - - glitchygames.engine.GameEngine.EventProxy.proxies +
    + glitchygames.engine.GameEngine.windowed instance-attribute - -
    proxies = []
    +
    +
    windowed = get('windowed')
     
    @@ -31666,16 +22669,16 @@
    - - glitchygames.engine.GameEngine.EventProxy.event_source +
    + glitchygames.engine.GameEngine.fps_refresh_rate instance-attribute - -
    event_source = event_source
    +
    +
    fps_refresh_rate = get('fps_refresh_rate')
     
    @@ -31683,197 +22686,110 @@
    -Functions - - -
    - - - - - glitchygames.engine.GameEngine.EventProxy.__init__ - - - -
    __init__(event_source: object) -> None
    -
    - -
    - -

    Initialize the event proxy.

    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event_source - (object) - – -
      -

      The event source.

      -
      -
    • -
    -
    +
    + glitchygames.engine.GameEngine.pygame_version + + + instance-attribute + - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    +
    pygame_version = {'major': 0, 'minor': 0, 'patch': 0}
    +
    + +
    - -
    +
    - - glitchygames.engine.GameEngine.EventProxy.unhandled_event +
    + glitchygames.engine.GameEngine.scene_manager + + + instance-attribute + - -
    unhandled_event(*args, **kwargs) -> None
    +
    +
    scene_manager: SceneManager = SceneManager()
     
    - -

    Handle unhandled events.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.engine.GameEngine.mode_flags + + + + instance-attribute + + +
    +
    mode_flags: int = 0
    +
    + +
    - -
    +
    - - glitchygames.engine.GameEngine.EventProxy.__getattr__ +
    + glitchygames.engine.GameEngine.desired_resolution + + + instance-attribute + - -
    __getattr__(attr: str) -> Callable
    +
    +
    desired_resolution: tuple[int, int] = suggested_resolution(desired_width, desired_height)
     
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.screen_width + -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    + + property + +
    +
    screen_width: int
    +
    +
    + +

    Get the screen width.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    @@ -31887,88 +22803,40 @@
    -
    • - Callable - – +int( int +) –
      -

      The attribute.

      +

      The screen width.

    -
    - -
    - - - -
    - -
    - +
    -
    Functions
    - -
    +
    -
    - glitchygames.engine.GameEngine.__new__ +
    + glitchygames.engine.GameEngine.screen_height + + + property +
    -
    __new__(*args, **kwargs) -> object
    +
    screen_height: int
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    - - +

    Get the screen height.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    @@ -31982,45 +22850,22 @@
    -
    • - object - – +int( int +) –
      -

      The new instance of the class.

      +

      The screen height.

    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    +
    +
    Functions
    +
    diff --git a/reference/glitchygames/events/index.html b/reference/glitchygames/events/index.html index dd8963a..5b17c17 100644 --- a/reference/glitchygames/events/index.html +++ b/reference/glitchygames/events/index.html @@ -690,7 +690,7 @@

    GameEngine created to process mouse events with.

    This behavior allows easy access to resource managers anywhere in the game without needing an explicit copy -of the game object, althogh since GameEngine is also +of the game object, although since GameEngine is also a subclass of EventManager, it too is a ResourceManager which can be gotten to from anywhere, since it's a singleton.

    @@ -1635,31 +1635,6 @@

    Functions
    -
    - glitchygames.events.AudioEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.AudioEvents.on_audio_device_added_event @@ -1848,31 +1823,6 @@
    Functions
    -
    - glitchygames.events.AudioEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.AudioEventStubs.on_audio_device_added_event @@ -2061,31 +2011,6 @@
    Functions
    -
    - glitchygames.events.ControllerEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.ControllerEvents.on_controller_axis_motion_event @@ -2792,31 +2717,6 @@
    Functions
    -
    - glitchygames.events.ControllerEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.ControllerEventStubs.on_controller_axis_motion_event @@ -3523,31 +3423,6 @@
    Functions
    -
    - glitchygames.events.DropEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.DropEvents.on_drop_begin_event @@ -3884,31 +3759,6 @@
    Functions
    -
    - glitchygames.events.DropEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.DropEventStubs.on_drop_begin_event @@ -4245,31 +4095,6 @@
    Functions
    -
    - glitchygames.events.TouchEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.TouchEvents.on_touch_down_event @@ -4754,31 +4579,6 @@
    Functions
    -
    - glitchygames.events.TouchEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.TouchEventStubs.on_touch_down_event @@ -5267,31 +5067,6 @@
    Functions
    -
    - glitchygames.events.GameEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.GameEvents.on_active_event @@ -6002,31 +5777,6 @@
    Functions
    -
    - glitchygames.events.GameEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.GameEventStubs.on_active_event @@ -6733,31 +6483,6 @@
    Functions
    -
    - glitchygames.events.FontEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.FontEvents.on_font_changed_event @@ -6872,33 +6597,8 @@
    Functions
    -
    - glitchygames.events.FontEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.events.FontEventStubs.on_font_changed_event +
    + glitchygames.events.FontEventStubs.on_font_changed_event @@ -7035,31 +6735,6 @@
    Functions
    -
    - glitchygames.events.KeyboardEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.KeyboardEventStubs.on_key_down_event @@ -7412,31 +7087,6 @@
    Functions
    -
    - glitchygames.events.JoystickEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.JoystickEvents.on_joy_axis_motion_event @@ -7995,31 +7645,6 @@
    Functions
    -
    - glitchygames.events.JoystickEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.JoystickEventStubs.on_joy_axis_motion_event @@ -8626,31 +8251,6 @@
    Functions
    -
    - glitchygames.events.MouseEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.MouseEvents.on_mouse_motion_event @@ -10399,31 +9999,6 @@
    Functions
    -
    - glitchygames.events.MouseEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.MouseEventStubs.on_mouse_motion_event @@ -12172,31 +11747,6 @@
    Functions
    -
    - glitchygames.events.TextEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.TextEvents.on_text_editing_event @@ -12385,31 +11935,6 @@
    Functions
    -
    - glitchygames.events.TextEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.TextEventStubs.on_text_editing_event @@ -12598,31 +12123,6 @@
    Functions
    -
    - glitchygames.events.WindowEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.WindowEvents.on_window_close_event @@ -13847,31 +13347,6 @@
    Functions
    -
    - glitchygames.events.WindowEventStubs.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.events.WindowEventStubs.on_window_close_event @@ -15141,28 +14616,6 @@
    Attributes
    -
    - glitchygames.events.EventManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - -
    glitchygames.events.EventManager.log @@ -15528,210 +14981,6 @@
    Functions
    -
    - glitchygames.events.EventManager.__new__ - - -
    -
    __new__(*args, **kwargs) -> object
    -
    - -
    - -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - object - – -
      -

      The new instance of the class.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.events.EventManager.__getattr__ - - -
    -
    __getattr__(attr: str) -> Callable
    -
    - -
    - -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - Callable - – -
      -

      The attribute.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - -
    glitchygames.events.EventManager.__init__ diff --git a/reference/glitchygames/fonts/index.html b/reference/glitchygames/fonts/index.html index 5ae4afb..a9e47bb 100644 --- a/reference/glitchygames/fonts/index.html +++ b/reference/glitchygames/fonts/index.html @@ -379,31 +379,6 @@
    Functions
    -
    - glitchygames.fonts.FontEvents.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - -
    glitchygames.fonts.FontEvents.on_font_changed_event @@ -514,7 +489,7 @@

    GameEngine created to process mouse events with.

    This behavior allows easy access to resource managers anywhere in the game without needing an explicit copy -of the game object, althogh since GameEngine is also +of the game object, although since GameEngine is also a subclass of EventManager, it too is a ResourceManager which can be gotten to from anywhere, since it's a singleton.

    @@ -912,71 +887,6 @@

    Attributes
    -
    - glitchygames.fonts.FontManager.log - - - - class-attribute - instance-attribute - - -
    -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.fonts.FontManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.fonts.FontManager.proxies - - - - instance-attribute - - -
    -
    proxies = []
    -
    - -
    -
    - -
    - -
    - - -
    glitchygames.fonts.FontManager.OPTIONS @@ -1051,50 +961,6 @@
    - - glitchygames.fonts.FontManager.FontProxy.log - - - - class-attribute - instance-attribute - - - -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.fonts.FontManager.FontProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - glitchygames.fonts.FontManager.FontProxy.game @@ -1140,18 +1006,17 @@
    - - glitchygames.fonts.FontManager.FontProxy.__new__ + + glitchygames.fonts.FontManager.FontProxy.__init__ -
    __new__(*args, **kwargs) -> object
    +
    __init__(game: object = None) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Initialize the font proxy.

    @@ -1166,25 +1031,13 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs + game + (object, default: + None +) –
      -

      The keyword arguments.

      +

      The game object.

    @@ -1205,10 +1058,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -1216,305 +1069,15 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    - - - - - glitchygames.fonts.FontManager.FontProxy.__getattr__ - - - -
    __getattr__(attr: str) -> Callable
    -
    - -
    - -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - Callable - – -
      -

      The attribute.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.fonts.FontManager.FontProxy.__subclasshook__ - - - - classmethod - - - -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - - - glitchygames.fonts.FontManager.FontProxy.on_font_changed_event - - - - abstractmethod - - - -
    on_font_changed_event(event: Event) -> None
    -
    - -
    - -

    Handle font changed events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.fonts.FontManager.FontProxy.__init__ - - - -
    __init__(game: object = None) -> None
    -
    - -
    - -

    Initialize the font proxy.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - game - (object, default: - None -) - – -
      -

      The game object.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    +
    @@ -1525,210 +1088,6 @@
    Functions
    -
    - glitchygames.fonts.FontManager.__new__ - - -
    -
    __new__(*args, **kwargs) -> object
    -
    - -
    - -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - object - – -
      -

      The new instance of the class.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.fonts.FontManager.__getattr__ - - -
    -
    __getattr__(attr: str) -> Callable
    -
    - -
    - -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - Callable - – -
      -

      The attribute.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - -
    glitchygames.fonts.FontManager.__init__ diff --git a/reference/glitchygames/index.html b/reference/glitchygames/index.html new file mode 100644 index 0000000..e101937 --- /dev/null +++ b/reference/glitchygames/index.html @@ -0,0 +1,24989 @@ + + + + + + + + Index - GlitchyGames + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
      +
    • + +
    • +
    • +
    +
    +
    +
    +
    + +
    + + + +

    + glitchygames.engine + + +

    + +
    + +

    Contains GameEngine and helper classes for building a game.

    + + + +
    + + + + + +

    Attributes

    + +
    + + + +

    + glitchygames.engine.PURPLE + + + + module-attribute + + +

    +
    PURPLE = PURPLE
    +
    + +
    +
    + +
    + +
    + + + +

    + glitchygames.engine.LOG + + + + module-attribute + + +

    +
    LOG: Logger = getLogger('game.engine')
    +
    + +
    +
    + +
    + +
    + + + +

    + glitchygames.engine.PACKAGE_PATH + + + + module-attribute + + +

    +
    PACKAGE_PATH: str = parent
    +
    + +
    +
    + +
    + +
    + + + +

    + glitchygames.engine.ASSET_PATH + + + + module-attribute + + +

    +
    ASSET_PATH: str = parent / 'assets'
    +
    + +
    +
    + +
    + +
    + + + +

    + glitchygames.engine.TEST_MODE + + + + module-attribute + + +

    +
    TEST_MODE = False
    +
    + +
    +
    + +
    +

    Classes

    + +
    + + + +

    + glitchygames.engine.HashableEvent + + +

    + + +
    +

    + Bases: dict

    + + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.HashableEvent.type + + + + instance-attribute + + +
    +
    type = type
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.HashableEvent.__hash + + + + instance-attribute + + +
    +
    __hash = hash((type, tuple(keys())))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.HashableEvent.dict + + + + property + + +
    +
    dict
    +
    + +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__init__ + + +
    +
    __init__(type, *args, **attributes)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__setitem__ + + +
    +
    __setitem__(key, item)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__getitem__ + + +
    +
    __getitem__(key)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__repr__ + + +
    +
    __repr__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__len__ + + +
    +
    __len__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__delitem__ + + +
    +
    __delitem__(key)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.clear + + +
    +
    clear()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.copy + + +
    +
    copy()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.has_key + + +
    +
    has_key(k)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.update + + +
    +
    update(*args, **kwargs)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.keys + + +
    +
    keys()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.values + + +
    +
    values()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__hash__ + + +
    +
    __hash__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__eq__ + + +
    +
    __eq__(other)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__ne__ + + +
    +
    __ne__(other)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__str__ + + +
    +
    __str__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__copy__ + + +
    +
    __copy__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__deepcopy__ + + +
    +
    __deepcopy__(memo)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__reduce__ + + +
    +
    __reduce__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__setstate__ + + +
    +
    __setstate__(state)
    +
    + +
    + +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.AudioManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage pygame audio events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.AudioManager.proxies + + + + instance-attribute + + +
    +
    proxies = [AudioProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.AudioManager.AudioProxy + + +
    + + +
    +

    + Bases: AudioEvents, ResourceManager

    + + +

    Pygame audio event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, mixer]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the audio proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.on_audio_device_added_event + + + +
    on_audio_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle audio device added event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.on_audio_device_removed_event + + + +
    on_audio_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle audio device removed event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.AudioManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the audio manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.AudioManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add arguments to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      The argument parser.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.ControllerManager + + +

    + + +
    +

    + Bases: ControllerEvents, ResourceManager

    + + +

    Manage controller events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.ControllerManager.log + + + + class-attribute + instance-attribute + + +
    +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.ControllerManager.controllers + + + + instance-attribute + + +
    +
    controllers = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.ControllerManager.proxies + + + + instance-attribute + + +
    +
    proxies = [game]
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.ControllerManager.game + + + + instance-attribute + + +
    +
    game = game
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.ControllerManager.ControllerProxy + + +
    + + +
    +

    + Bases: ControllerEvents, ResourceManager

    + + +

    Proxy class for controller events.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.log + + + + class-attribute + instance-attribute + + + +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.AXIS + + + + class-attribute + instance-attribute + + + +
    AXIS: ClassVar = [
    +    CONTROLLER_AXIS_LEFTX,
    +    CONTROLLER_AXIS_LEFTY,
    +    CONTROLLER_AXIS_RIGHTX,
    +    CONTROLLER_AXIS_RIGHTY,
    +    CONTROLLER_AXIS_TRIGGERLEFT,
    +    CONTROLLER_AXIS_TRIGGERRIGHT,
    +]
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.BUTTONS + + + + class-attribute + instance-attribute + + + +
    BUTTONS: ClassVar = [
    +    CONTROLLER_BUTTON_A,
    +    CONTROLLER_BUTTON_B,
    +    CONTROLLER_BUTTON_X,
    +    CONTROLLER_BUTTON_Y,
    +    CONTROLLER_BUTTON_DPAD_UP,
    +    CONTROLLER_BUTTON_DPAD_DOWN,
    +    CONTROLLER_BUTTON_DPAD_LEFT,
    +    CONTROLLER_BUTTON_DPAD_RIGHT,
    +    CONTROLLER_BUTTON_LEFTSHOULDER,
    +    CONTROLLER_BUTTON_RIGHTSHOULDER,
    +    CONTROLLER_BUTTON_LEFTSTICK,
    +    CONTROLLER_BUTTON_RIGHTSTICK,
    +    CONTROLLER_BUTTON_BACK,
    +    CONTROLLER_BUTTON_GUIDE,
    +    CONTROLLER_BUTTON_START,
    +]
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.controller + + + + instance-attribute + + + +
    controller = Controller(_id)
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, controller]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.__init__ + + + +
    __init__(game: object = None, controller_id: int = -1) -> None
    +
    + +
    + +

    Initialize the controller proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    • + controller_id + (int, default: + -1 +) + – +
      +

      The controller id.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_axis_motion_event + + + +
    on_controller_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle controller axis motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_button_down_event + + + +
    on_controller_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_button_up_event + + + +
    on_controller_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_added_event + + + +
    on_controller_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device added events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_remapped_event + + + +
    on_controller_device_remapped_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device remapped events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_removed_event + + + +
    on_controller_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device removed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_down_event + + + +
    on_controller_touchpad_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_motion_event + + + +
    on_controller_touchpad_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_up_event + + + +
    on_controller_touchpad_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.__str__ + + + +
    __str__() -> LiteralString
    +
    + +
    + +

    Return a string representation of the controller.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( LiteralString +) – +
      +

      A string representation of the controller.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.__repr__ + + + +
    __repr__() -> str
    +
    + +
    + +

    Return a string representation of the controller object.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      A string representation of the controller object.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the ControllerManager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add controller options to the parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser: The argument parser.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_axis_motion_event + + +
    +
    on_controller_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle controller axis motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_button_down_event + + +
    +
    on_controller_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_button_up_event + + +
    +
    on_controller_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_device_added_event + + +
    +
    on_controller_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device added events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_device_remapped_event + + +
    +
    on_controller_device_remapped_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device remapped events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_device_removed_event + + +
    +
    on_controller_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device removed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_down_event + + +
    +
    on_controller_touchpad_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_motion_event + + +
    +
    on_controller_touchpad_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_up_event + + +
    +
    on_controller_touchpad_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.DropManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage drop events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.DropManager.proxies + + + + instance-attribute + + +
    +
    proxies = [DropProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.DropManager.DropProxy + + +
    + + +
    +

    + Bases: DropEvents, ResourceManager

    + + +

    Proxy class for drop events.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.DropManager.DropProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.DropManager.DropProxy.proxies + + + + instance-attribute + + + +
    proxies = [game]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the drop proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.on_drop_begin_event + + + +
    on_drop_begin_event(event: Event) -> None
    +
    + +
    + +

    Handle drop begin event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.on_drop_complete_event + + + +
    on_drop_complete_event(event: Event) -> None
    +
    + +
    + +

    Handle drop complete event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.on_drop_file_event + + + +
    on_drop_file_event(event: Event) -> None
    +
    + +
    + +

    Handle drop file event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.on_drop_text_event + + + +
    on_drop_text_event(event: Event) -> None
    +
    + +
    + +

    Handle drop text event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.DropManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the drop manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.DropManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add arguments to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      The argument parser.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.JoystickManager + + +

    + + +
    +

    + Bases: JoystickEvents, ResourceManager

    + + +

    Manage joystick events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.JoystickManager.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.joysticks + + + + instance-attribute + + +
    +
    joysticks = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.game + + + + instance-attribute + + +
    +
    game = game
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.proxies + + + + instance-attribute + + +
    +
    proxies = [game]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.JoystickManager.JoystickProxy + + +
    + + +
    +

    + Bases: JoystickEvents, ResourceManager

    + + +

    Joystick event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.log + + + + class-attribute + instance-attribute + + + +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.joystick + + + + instance-attribute + + + +
    joystick = Joystick(_id)
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, joystick]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.__init__ + + + +
    __init__(game: object = None, joystick_id: int = -1) -> None
    +
    + +
    + +

    Initialize the joystick event proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    • + joystick_id + (int, default: + -1 +) + – +
      +

      The joystick id.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_axis_motion_event + + + +
    on_joy_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick axis motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_button_down_event + + + +
    on_joy_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_button_up_event + + + +
    on_joy_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_hat_motion_event + + + +
    on_joy_hat_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick hat motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_ball_motion_event + + + +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick ball motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_device_added_event + + + +
    on_joy_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device added events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_device_removed_event + + + +
    on_joy_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device removed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_name + + + +
    get_name() -> str
    +
    + +
    + +

    Get the joystick name.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      The joystick name.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_init + + + +
    get_init() -> bool
    +
    + +
    + +

    Get the joystick init status.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      The joystick init status.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numaxes + + + +
    get_numaxes() -> int
    +
    + +
    + +

    Get the number of axes.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The number of axes.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numballs + + + +
    get_numballs() -> int
    +
    + +
    + +

    Get the number of trackballs.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The number of trackballs.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numbuttons + + + +
    get_numbuttons() -> int
    +
    + +
    + +

    Get the number of buttons.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The number of buttons.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numhats + + + +
    get_numhats() -> int
    +
    + +
    + +

    Get the number of hats.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The number of hats.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.__str__ + + + +
    __str__() -> str
    +
    + +
    + +

    Get the joystick info.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      The joystick info.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.__repr__ + + + +
    __repr__() -> str
    +
    + +
    + +

    Get the joystick representation.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      The joystick representation.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the joystick event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add joystick-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_axis_motion_event + + +
    +
    on_joy_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick axis motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_button_down_event + + +
    +
    on_joy_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_button_up_event + + +
    +
    on_joy_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_hat_motion_event + + +
    +
    on_joy_hat_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick hat motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_ball_motion_event + + +
    +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick ball motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_device_added_event + + +
    +
    on_joy_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device added events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_device_removed_event + + +
    +
    on_joy_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device removed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.KeyboardManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage keyboard events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.KeyboardManager.proxies + + + + instance-attribute + + +
    +
    proxies = [KeyboardProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.KeyboardManager.KeyboardProxy + + +
    + + +
    +

    + Bases: KeyboardEvents, ResourceManager

    + + +

    Keyboard event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.keys + + + + instance-attribute + + + +
    keys = {}
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, key]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the keyboard event proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_down_event + + + +
    on_key_down_event(event: Event) -> None
    +
    + +
    + +

    Handle key down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_up_event + + + +
    on_key_up_event(event: Event) -> None
    +
    + +
    + +

    Handle key up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_chord_down_event + + + +
    on_key_chord_down_event(event: Event) -> None
    +
    + +
    + +

    Handle key chord down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + keys_down + (list) + – +
      +

      The keys that are currently down.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_chord_up_event + + + +
    on_key_chord_up_event(event: Event) -> None
    +
    + +
    + +

    Handle key chord up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.KeyboardManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the keyboard event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.KeyboardManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add keyboard-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.MidiManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage midi events.

    + + + + +
    + + + + + + + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.MidiManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the midi event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.MidiManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add midi-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.MouseManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Mouse manager event handler.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.MouseManager.proxies + + + + instance-attribute + + +
    +
    proxies = [MouseProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.MouseManager.MouseProxy + + +
    + + +
    +

    + Bases: MouseEvents, ResourceManager

    + + +

    Mouse manager event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.mouse_state + + + + instance-attribute + + + +
    mouse_state = {}
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.mouse_dragging + + + + instance-attribute + + + +
    mouse_dragging = False
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.mouse_dropping + + + + instance-attribute + + + +
    mouse_dropping = False
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.current_focus + + + + instance-attribute + + + +
    current_focus = None
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.previous_focus + + + + instance-attribute + + + +
    previous_focus = None
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.focus_locked + + + + instance-attribute + + + +
    focus_locked = False
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, mouse]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the mouse manager event proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_motion_event + + + +
    on_mouse_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_drag_event + + + +
    on_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_drop_event + + + +
    on_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_drag_event + + + +
    on_left_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the left mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_drop_event + + + +
    on_left_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the left mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_drag_event + + + +
    on_middle_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the middle mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_drop_event + + + +
    on_middle_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the middle mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_drag_event + + + +
    on_right_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the right mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_drop_event + + + +
    on_right_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the right mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_focus_event + + + +
    on_mouse_focus_event(event: Event, entering_focus: object) -> None
    +
    + +
    + +

    Handle the mouse focus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + entering_focus + (object) + – +
      +

      The object entering focus.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_unfocus_event + + + +
    on_mouse_unfocus_event(event: Event, leaving_focus: object) -> None
    +
    + +
    + +

    Handle the mouse unfocus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + leaving_focus + (object) + – +
      +

      The object leaving focus.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_button_up_event + + + +
    on_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_button_up_event + + + +
    on_left_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the left mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_button_up_event + + + +
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the middle mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_button_up_event + + + +
    on_right_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the right mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_button_down_event + + + +
    on_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_button_down_event + + + +
    on_left_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the left mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_button_down_event + + + +
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the middle mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_button_down_event + + + +
    on_right_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the right mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_scroll_down_event + + + +
    on_mouse_scroll_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse scroll down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_scroll_up_event + + + +
    on_mouse_scroll_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse scroll up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_wheel_event + + + +
    on_mouse_wheel_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse wheel event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.MouseManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the mouse manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.MouseManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add arguments to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.TouchManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Touch event manager.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.TouchManager.proxies + + + + instance-attribute + + +
    +
    proxies = [TouchProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.TouchManager.TouchProxy + + +
    + + +
    +

    + Bases: TouchEvents, ResourceManager

    + + +

    Touch event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.fingers + + + + instance-attribute + + + +
    fingers: dict = {}
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.game + + + + instance-attribute + + + +
    game: object = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.proxies + + + + instance-attribute + + + +
    proxies: list = [game, touch]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the finger event proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_touch_down_event + + + +
    on_touch_down_event(event: Event) -> None
    +
    + +
    + +

    Handle finger down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_touch_motion_event + + + +
    on_touch_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle finger motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_touch_up_event + + + +
    on_touch_up_event(event: Event) -> None
    +
    + +
    + +

    Handle finger up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_down_event + + + +
    on_multi_touch_down_event(event: Event) -> None
    +
    + +
    + +

    Handle multi-touch down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_motion_event + + + +
    on_multi_touch_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle multi-touch motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_up_event + + + +
    on_multi_touch_up_event(event: Event) -> None
    +
    + +
    + +

    Handle multi-touch up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.TouchManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the touch event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.WindowManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Window manager event handler.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.WindowManager.proxies + + + + instance-attribute + + +
    +
    proxies = [WindowManagerProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.WindowManager.WindowManagerProxy + + +
    + + +
    +

    + Bases: WindowEvents, ResourceManager

    + + +

    Window manager event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.proxies + + + + instance-attribute + + + +
    proxies = [game]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the window manager proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_close_event + + + +
    on_window_close_event(event: Event) -> None
    +
    + +
    + +

    Handle the window close event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_enter_event + + + +
    on_window_enter_event(event: Event) -> None
    +
    + +
    + +

    Handle the window enter event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_exposed_event + + + +
    on_window_exposed_event(event: Event) -> None
    +
    + +
    + +

    Handle the window exposed event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_focus_gained_event + + + +
    on_window_focus_gained_event(event: Event) -> None
    +
    + +
    + +

    Handle the window focus gained event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_focus_lost_event + + + +
    on_window_focus_lost_event(event: Event) -> None
    +
    + +
    + +

    Handle the window focus lost event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_hidden_event + + + +
    on_window_hidden_event(event: Event) -> None
    +
    + +
    + +

    Handle the window hidden event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_hit_test_event + + + +
    on_window_hit_test_event(event: Event) -> None
    +
    + +
    + +

    Handle the window hit test event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_leave_event + + + +
    on_window_leave_event(event: Event) -> None
    +
    + +
    + +

    Handle the window leave event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_maximized_event + + + +
    on_window_maximized_event(event: Event) -> None
    +
    + +
    + +

    Handle the window maximized event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_minimized_event + + + +
    on_window_minimized_event(event: Event) -> None
    +
    + +
    + +

    Handle the window minimized event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_moved_event + + + +
    on_window_moved_event(event: Event) -> None
    +
    + +
    + +

    Handle the window moved event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_resized_event + + + +
    on_window_resized_event(event: Event) -> None
    +
    + +
    + +

    Handle the window resized event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_restored_event + + + +
    on_window_restored_event(event: Event) -> None
    +
    + +
    + +

    Handle the window restored event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_shown_event + + + +
    on_window_shown_event(event: Event) -> None
    +
    + +
    + +

    Handle the window shown event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_size_changed_event + + + +
    on_window_size_changed_event(event: Event) -> None
    +
    + +
    + +

    Handle the window size changed event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_take_focus_event + + + +
    on_window_take_focus_event(event: Event) -> None
    +
    + +
    + +

    Handle the window take focus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.WindowManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the window event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.WindowManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add window-specific arguments to the global parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.FontManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    A font manager.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.FontManager.OPTIONS + + + + class-attribute + instance-attribute + + +
    +
    OPTIONS: ClassVar = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.FontManager.RENDER_CACHE + + + + class-attribute + instance-attribute + + +
    +
    RENDER_CACHE: ClassVar = {}
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.FontManager.FontProxy + + +
    + + +
    +

    + Bases: FontEvents, ResourceManager

    + + +

    A font proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.FontManager.FontProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.FontManager.FontProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, freetype]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.FontManager.FontProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the font proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.FontManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the font manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.FontManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add font options to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.FontManager.font + + + + classmethod + + +
    +
    font(font_config: dict | None = None) -> Font | SysFont
    +
    + +
    + +

    Return a font object.

    +

    If the font requested can't be found then bitstream_vera will be loaded instead.

    +

    Note that if you are trying to package your game with pyinstaller, you'll need to bundle +your game's fonts with the pyinstaller invocation. Make sure you have distribution +rights to the fonts you're including with your game.

    +

    bitstream_vera is a permissively licensed font that can be used with your game.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + font_config + (dict | None, default: + None +) + – +
      +

      The font configuration.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + Font | SysFont + – +
      +

      pygame.freetype.Font | pygame.freetype.SysFont

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.Scene + + +

    + + +
    +

    + Bases: SceneInterface, SpriteInterface, AllEventStubs

    + + +

    Scene object base class.

    +

    Subclass this to properly receive on_*_event() messages automatically.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.Scene.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.FPS + + + + class-attribute + instance-attribute + + +
    +
    FPS = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.NAME + + + + class-attribute + instance-attribute + + +
    +
    NAME = 'Unnamed Scene'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.VERSION + + + + class-attribute + instance-attribute + + +
    +
    VERSION = '0.0'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.target_fps + + + + instance-attribute + + +
    +
    target_fps = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.fps + + + + instance-attribute + + +
    +
    fps = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dt + + + + instance-attribute + + +
    +
    dt = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dt_timer + + + + instance-attribute + + +
    +
    dt_timer = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dirty + + + + instance-attribute + + +
    +
    dirty = 1
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.options + + + + instance-attribute + + +
    +
    options = options
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.scene_manager + + + + instance-attribute + + +
    +
    scene_manager = SceneManager()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.name + + + + instance-attribute + + +
    +
    name = type(self)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.next_scene + + + + instance-attribute + + +
    +
    next_scene = self
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.rects + + + + instance-attribute + + +
    +
    rects = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.screen + + + + instance-attribute + + +
    +
    screen = get_surface()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.screen_width + + + + instance-attribute + + +
    +
    screen_width = get_width()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.screen_height + + + + instance-attribute + + +
    +
    screen_height = get_height()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.all_sprites + + + + instance-attribute + + +
    +
    all_sprites = groups
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.background + + + + instance-attribute + + +
    +
    background = Surface(get_size())
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.background_color + + + + property + writable + + +
    +
    background_color: Color
    +
    + +
    + +

    Return the background color.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + Color + – +
      +

      pygame.Color: The background color.

      +
      +
    • +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.image + + + + instance-attribute + + +
    +
    image = screen
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.rect + + + + instance-attribute + + +
    +
    rect = get_rect()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.screenshot + + + + property + + +
    +
    screenshot: Surface
    +
    + +
    + +

    Return a screenshot of the scene.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + Surface + – +
      +

      pygame.Surface: The scene screenshot.

      +
      +
    • +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.Scene.__init__ + + +
    +
    __init__(options: dict | None = None, groups: LayeredDirty | None = None) -> None
    +
    + +
    + +

    Initialize the scene.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + options + (dict | None, default: + None +) + – +
      +

      The options passed to the game.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.setup + + +
    +
    setup() -> None
    +
    + +
    + +

    Setup the scene.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.cleanup + + +
    +
    cleanup() -> None
    +
    + +
    + +

    Cleanup the scene.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.dt_tick + + +
    +
    dt_tick(dt: float) -> None
    +
    + +
    + +

    Update the scene's delta time.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + dt + (float) + – +
      +

      The delta time to update.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.update + + +
    +
    update() -> None
    +
    + +
    + +

    Update the active scene.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.render + + +
    +
    render(screen: Surface) -> None
    +
    + +
    + +

    Render the active scene.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + screen + (Surface) + – +
      +

      The screen to render to.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.sprites_at_position + + +
    +
    sprites_at_position(pos: tuple) -> list[Sprite] | None
    +
    + +
    + +

    Return the sprites at a given position.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + pos + (tuple) + – +
      +

      The position to check.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + list[Sprite] | None + – +
      +

      list[pygame.sprite.Sprite] | None: The sprites at the given position.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_controller_button_down_event + + +
    +
    on_controller_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_controller_button_up_event + + +
    +
    on_controller_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_joy_button_down_event + + +
    +
    on_joy_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle joy button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_joy_button_up_event + + +
    +
    on_joy_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle joy button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_key_up_event + + +
    +
    on_key_up_event(event: Event) -> None
    +
    + +
    + +

    Handle key up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_mouse_drag_event + + +
    +
    on_mouse_drag_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle mouse drag events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_mouse_drop_event + + +
    +
    on_mouse_drop_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle mouse drop events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_left_mouse_drag_event + + +
    +
    on_left_mouse_drag_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle left mouse drag events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_left_mouse_drop_event + + +
    +
    on_left_mouse_drop_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle left mouse drop events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_middle_mouse_drag_event + + +
    +
    on_middle_mouse_drag_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle middle mouse drag events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_middle_mouse_drop_event + + +
    +
    on_middle_mouse_drop_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle middle mouse drop events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_right_mouse_drag_event + + +
    +
    on_right_mouse_drag_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle right mouse drag events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_right_mouse_drop_event + + +
    +
    on_right_mouse_drop_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle right mouse drop events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_left_mouse_button_up_event + + +
    +
    on_left_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle left mouse button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_middle_mouse_button_up_event + + +
    +
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle middle mouse button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_right_mouse_button_up_event + + +
    +
    on_right_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle right mouse button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_left_mouse_button_down_event + + +
    +
    on_left_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle left mouse button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_middle_mouse_button_down_event + + +
    +
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle middle mouse button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_right_mouse_button_down_event + + +
    +
    on_right_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle right mouse button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_sys_wm_event + + +
    +
    on_sys_wm_event(event: Event) -> None
    +
    + +
    + +

    Handle sys wm events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_text_editing_event + + +
    +
    on_text_editing_event(event: Event) -> None
    +
    + +
    + +

    Handle text editing events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_text_input_event + + +
    +
    on_text_input_event(event: Event) -> None
    +
    + +
    + +

    Handle text input events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_touch_down_event + + +
    +
    on_touch_down_event(event: Event) -> None
    +
    + +
    + +

    Handle touch down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_touch_motion_event + + +
    +
    on_touch_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle touch motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_touch_up_event + + +
    +
    on_touch_up_event(event: Event) -> None
    +
    + +
    + +

    Handle touch up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_user_event + + +
    +
    on_user_event(event: Event) -> None
    +
    + +
    + +

    Handle user events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_video_expose_event + + +
    +
    on_video_expose_event(event: Event) -> None
    +
    + +
    + +

    Handle video expose events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_video_resize_event + + +
    +
    on_video_resize_event(event: Event) -> None
    +
    + +
    + +

    Handle video resize events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_close_event + + +
    +
    on_window_close_event(event: Event) -> None
    +
    + +
    + +

    Handle window close events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_enter_event + + +
    +
    on_window_enter_event(event: Event) -> None
    +
    + +
    + +

    Handle window enter events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_exposed_event + + +
    +
    on_window_exposed_event(event: Event) -> None
    +
    + +
    + +

    Handle window exposed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_focus_gained_event + + +
    +
    on_window_focus_gained_event(event: Event) -> None
    +
    + +
    + +

    Handle window focus gained events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_focus_lost_event + + +
    +
    on_window_focus_lost_event(event: Event) -> None
    +
    + +
    + +

    Handle window focus lost events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_hidden_event + + +
    +
    on_window_hidden_event(event: Event) -> None
    +
    + +
    + +

    Handle window hidden events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_hit_test_event + + +
    +
    on_window_hit_test_event(event: Event) -> None
    +
    + +
    + +

    Handle window hit test events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_leave_event + + +
    +
    on_window_leave_event(event: Event) -> None
    +
    + +
    + +

    Handle window leave events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_maximized_event + + +
    +
    on_window_maximized_event(event: Event) -> None
    +
    + +
    + +

    Handle window maximized events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_minimized_event + + +
    +
    on_window_minimized_event(event: Event) -> None
    +
    + +
    + +

    Handle window minimized events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_moved_event + + +
    +
    on_window_moved_event(event: Event) -> None
    +
    + +
    + +

    Handle window moved events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_resized_event + + +
    +
    on_window_resized_event(event: Event) -> None
    +
    + +
    + +

    Handle window resized events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_restored_event + + +
    +
    on_window_restored_event(event: Event) -> None
    +
    + +
    + +

    Handle window restored events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_shown_event + + +
    +
    on_window_shown_event(event: Event) -> None
    +
    + +
    + +

    Handle window shown events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_size_changed_event + + +
    +
    on_window_size_changed_event(event: Event) -> None
    +
    + +
    + +

    Handle window size changed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_take_focus_event + + +
    +
    on_window_take_focus_event(event: Event) -> None
    +
    + +
    + +

    Handle window take focus events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_quit_event + + +
    +
    on_quit_event(event: Event) -> None
    +
    + +
    + +

    Handle quit events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_fps_event + + +
    +
    on_fps_event(event: Event) -> None
    +
    + +
    + +

    Handle FPS events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.load_resources + + +
    +
    load_resources() -> None
    +
    + +
    + +

    Load the scene's resources.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.SceneManager + + +

    + + +
    +

    + Bases: SceneInterface, EventManager

    + + +

    Glitchy Games Scene Manager.

    +

    The scene manager is responsible for managing the active scene, +and for processing events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.SceneManager.log + + + + class-attribute + instance-attribute + + +
    +
    log: ClassVar = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.OPTIONS + + + + class-attribute + instance-attribute + + +
    +
    OPTIONS: ClassVar = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.screen + + + + instance-attribute + + +
    +
    screen = get_surface()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.update_type + + + + instance-attribute + + +
    +
    update_type = 'update'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.fps_refresh_rate + + + + instance-attribute + + +
    +
    fps_refresh_rate = 1000
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.target_fps + + + + instance-attribute + + +
    +
    target_fps = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.dt + + + + instance-attribute + + +
    +
    dt = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.timer + + + + instance-attribute + + +
    +
    timer = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.active_scene + + + + instance-attribute + + +
    +
    active_scene = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.next_scene + + + + instance-attribute + + +
    +
    next_scene = active_scene
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.previous_scene + + + + instance-attribute + + +
    +
    previous_scene = active_scene
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.quit_requested + + + + instance-attribute + + +
    +
    quit_requested = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.clock + + + + instance-attribute + + +
    +
    clock = Clock()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.game_engine + + + + property + writable + + +
    +
    game_engine: object
    +
    + +
    + +

    Return the game engine.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +object( object +) – +
      +

      The game engine.

      +
      +
    • +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.all_sprites + + + + property + + +
    +
    all_sprites: LayeredDirty | None
    +
    + +
    + +

    Return the active scene's sprite group.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + LayeredDirty | None + – +
      +

      pygame.sprite.LayeredDirty | None: The active scene's sprite group.

      +
      +
    • +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.SceneManager.__init__ + + +
    +
    __init__() -> None
    +
    + +
    + +

    Initialize the scene manager.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.switch_to_scene + + +
    +
    switch_to_scene(next_scene: Scene) -> None
    +
    + +
    + +

    Switch to the next scene.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + next_scene + (Scene) + – +
      +

      The next scene to switch to.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.play + + +
    +
    play() -> None
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.start + + +
    +
    start() -> None
    +
    + +
    + +

    Start the scene manager.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.stop + + +
    +
    stop() -> None
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.terminate + + +
    +
    terminate() -> None
    +
    + +
    + +

    Terminate the scene manager.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.quit + + +
    +
    quit() -> None
    +
    + +
    + +

    Quit the game.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.quit_game + + +
    +
    quit_game() -> None
    +
    + +
    + +

    Quit the game.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.on_quit_event + + +
    +
    on_quit_event(event: Event) -> None
    +
    + +
    + +

    Handle quit events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.on_fps_event + + +
    +
    on_fps_event(event: Event) -> None
    +
    + +
    + +

    Handle FPS events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.on_game_event + + +
    +
    on_game_event(event: Event) -> None
    +
    + +
    + +

    Handle game events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.register_game_event + + +
    +
    register_game_event(event_type: EventType, callback: Callable) -> None
    +
    + +
    + +

    Register a game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event_type + (EventType) + – +
      +

      The event type to register.

      +
      +
    • +
    • + callback + (Callable) + – +
      +

      The callback to call when the event is triggered.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.__getattr__ + + +
    +
    __getattr__(attr: str) -> Callable
    +
    + +
    + +

    Proxy calls to the active scene.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + attr + (str) + – +
      +

      The attribute to proxy.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +Callable( Callable +) – +
      +

      The callable object.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.Sprite + + +

    + + +
    +

    + Bases: RootSprite

    + + +

    A convenience class for handling all of the common sprite behaviors.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.Sprite.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.USE_GFXDRAW + + + + class-attribute + instance-attribute + + +
    +
    USE_GFXDRAW: ClassVar = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.PROXIES + + + + class-attribute + instance-attribute + + +
    +
    PROXIES: ClassVar = [sprite]
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.SPRITE_BREAKPOINTS + + + + class-attribute + instance-attribute + + +
    +
    SPRITE_BREAKPOINTS: ClassVar = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.SPRITE_COUNTERS + + + + class-attribute + instance-attribute + + +
    +
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.SPRITE_COUNT + + + + class-attribute + instance-attribute + + +
    +
    SPRITE_COUNT = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.image + + + + instance-attribute + + +
    +
    image = Surface((width, height))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.rect + + + + instance-attribute + + +
    +
    rect = get_rect()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.dt + + + + instance-attribute + + +
    +
    dt = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.dt_timer + + + + instance-attribute + + +
    +
    dt_timer = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.name + + + + instance-attribute + + +
    +
    name = name
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.parent + + + + instance-attribute + + +
    +
    parent = parent
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.proxies + + + + instance-attribute + + +
    +
    proxies = [self]
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.callbacks + + + + instance-attribute + + +
    +
    callbacks = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.screen + + + + instance-attribute + + +
    +
    screen = get_surface()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.screen_width + + + + instance-attribute + + +
    +
    screen_width = get_width()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.screen_height + + + + instance-attribute + + +
    +
    screen_height = get_height()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.width + + + + property + writable + + +
    +
    width: int
    +
    + +
    + +

    Return the width of the sprite.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The width of the sprite.

      +
      +
    • +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.height + + + + property + writable + + +
    +
    height: int
    +
    + +
    + +

    Return the height of the sprite.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The height of the sprite.

      +
      +
    • +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.Sprite.break_when + + + + classmethod + + +
    +
    break_when(sprite_type: object | None = None) -> None
    +
    + +
    + +

    Register a breakpoint for a sprite type.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + sprite_type + (object | None, default: + None +) + – +
      +

      The sprite type to break on.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.__init__ + + +
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
    +
    + +
    + +

    Initialize a Sprite.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + x + (int) + – +
      +

      The x coordinate of the sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the sprite.

      +
      +
    • +
    • + name + (str | None, default: + None +) + – +
      +

      The name of the sprite.

      +
      +
    • +
    • + parent + (object | None, default: + None +) + – +
      +

      The parent of the sprite.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.dt_tick + + +
    +
    dt_tick(dt: float) -> None
    +
    + +
    + +

    Update the sprite's delta time.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + dt + (float) + – +
      +

      The new delta time.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.update + + +
    +
    update() -> None
    +
    + +
    + +

    Update the sprite.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_axis_motion_event + + +
    +
    on_joy_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick axis motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_button_down_event + + +
    +
    on_joy_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_button_up_event + + +
    +
    on_joy_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_hat_motion_event + + +
    +
    on_joy_hat_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick hat motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_ball_motion_event + + +
    +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick ball motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_motion_event + + +
    +
    on_mouse_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_focus_event + + +
    +
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    +
    + +
    + +

    Handle a mouse focus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + old_focus + (object) + – +
      +

      The old focus.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_unfocus_event + + +
    +
    on_mouse_unfocus_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse unfocus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_enter_event + + +
    +
    on_mouse_enter_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse enter event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_exit_event + + +
    +
    on_mouse_exit_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse exit event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_drag_down_event + + +
    +
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a mouse drag down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_drag_down_event + + +
    +
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a left mouse drag down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_drag_up_event + + +
    +
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a left mouse drag up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_drag_down_event + + +
    +
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a middle mouse drag down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_drag_up_event + + +
    +
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a middle mouse drag up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_drag_down_event + + +
    +
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drag down event.

    +

    Args: +event (pygame.event.Event): The event to handle. +trigger (object | None): The object that triggered the event.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_drag_up_event + + +
    +
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drag up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_drag_up_event + + +
    +
    on_mouse_drag_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse drag up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_button_up_event + + +
    +
    on_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_button_up_event + + +
    +
    on_left_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a left mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_button_up_event + + +
    +
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a middle mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_button_up_event + + +
    +
    on_right_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a right mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_button_down_event + + +
    +
    on_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_button_down_event + + +
    +
    on_left_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a left mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_button_down_event + + +
    +
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a middle mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_button_down_event + + +
    +
    on_right_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a right mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_scroll_down_event + + +
    +
    on_mouse_scroll_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse scroll down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_scroll_up_event + + +
    +
    on_mouse_scroll_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse scroll up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_chord_up_event + + +
    +
    on_mouse_chord_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse chord up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_chord_down_event + + +
    +
    on_mouse_chord_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse chord down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_key_down_event + + +
    +
    on_key_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a key down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_key_up_event + + +
    +
    on_key_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a key up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_key_chord_down_event + + +
    +
    on_key_chord_down_event(event: Event, keys: list) -> None
    +
    + +
    + +

    Handle a key chord down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + keys + (list) + – +
      +

      The keys that were pressed.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_key_chord_up_event + + +
    +
    on_key_chord_up_event(event: Event, keys: list) -> None
    +
    + +
    + +

    Handle a key chord up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + keys + (list) + – +
      +

      The keys that were pressed.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_quit_event + + +
    +
    on_quit_event(event: Event) -> None
    +
    + +
    + +

    Handle a quit event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_active_event + + +
    +
    on_active_event(event: Event) -> None
    +
    + +
    + +

    Handle an active event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_video_resize_event + + +
    +
    on_video_resize_event(event: Event) -> None
    +
    + +
    + +

    Handle a video resize event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_video_expose_event + + +
    +
    on_video_expose_event(event: Event) -> None
    +
    + +
    + +

    Handle a video expose event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_sys_wm_event + + +
    +
    on_sys_wm_event(event: Event) -> None
    +
    + +
    + +

    Handle a sys wm event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_user_event + + +
    +
    on_user_event(event: Event) -> None
    +
    + +
    + +

    Handle a user event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_drag_event + + +
    +
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a left mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_drag_event + + +
    +
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a middle mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_drag_event + + +
    +
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_drop_event + + +
    +
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a left mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_drop_event + + +
    +
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a middle mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_drop_event + + +
    +
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_drag_event + + +
    +
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_drop_event + + +
    +
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_wheel_event + + +
    +
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a mouse wheel event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.__str__ + + +
    +
    __str__() -> str
    +
    + +
    + +

    Returns a string representation of the sprite.

    + +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.GameManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Game event manager.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.GameManager.log + + + + class-attribute + instance-attribute + + +
    +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameManager.proxies + + + + instance-attribute + + +
    +
    proxies: list[GameProxy] = [GameProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.GameManager.GameProxy + + +
    + + +
    +

    + Bases: ResourceManager

    + + +

    Game event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.GameManager.GameProxy.log + + + + class-attribute + instance-attribute + + + +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.GameManager.GameProxy.game + + + + instance-attribute + + + +
    game: object = get('game')
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.GameManager.GameProxy.proxies + + + + instance-attribute + + + +
    proxies = [game]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.__init__ + + + +
    __init__(**kwargs) -> None
    +
    + +
    + +

    Initialize the game proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + **kwargs + – +
      +

      Keyword arguments.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_active_event + + + +
    on_active_event(event: Event) -> None
    +
    + +
    + +

    Handle active event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_fps_event + + + +
    on_fps_event(event: Event) -> None
    +
    + +
    + +

    Handle fps event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_game_event + + + +
    on_game_event(event: Event) -> None
    +
    + +
    + +

    Handle game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_menu_item_event + + + +
    on_menu_item_event(event: Event) -> None
    +
    + +
    + +

    Handle menu item event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_sys_wm_event + + + +
    on_sys_wm_event(event: Event) -> None
    +
    + +
    + +

    Handle sys wm event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_user_event + + + +
    on_user_event(event: Event) -> None
    +
    + +
    + +

    Handle user event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_video_expose_event + + + +
    on_video_expose_event(event: Event) -> None
    +
    + +
    + +

    Handle video expose event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_video_resize_event + + + +
    on_video_resize_event(event: Event) -> None
    +
    + +
    + +

    Handle video resize event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_quit_event + + + +
    on_quit_event(event: Event) -> None
    +
    + +
    + +

    Handle quit event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.GameManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the game event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add arguments to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.GameEngine + + +

    + + +
    +

    + Bases: EventManager

    + + +

    Glitchy Games' Game engine.

    +

    The game engine is responsible for initializing pygame and +handling events. It also provides a number of helper methods +for common tasks such as setting the screen resolution and +setting the cursor.

    +

    Every Glitchy Game game inherits the GameEngine command line +options, so you can add your own command line options by +implementing the args() class method in your Scene class.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.GameEngine.log + + + + class-attribute + instance-attribute + + +
    +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.game + + + + class-attribute + instance-attribute + + +
    +
    game: object = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.icon + + + + class-attribute + instance-attribute + + +
    +
    icon: Surface = load(Path(ASSET_PATH) / 'glitch.png')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.NAME + + + + class-attribute + instance-attribute + + +
    +
    NAME: Literal['Boilerplate Adventures'] = 'Boilerplate Adventures'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.VERSION + + + + class-attribute + instance-attribute + + +
    +
    VERSION: Literal['1.0'] = '1.0'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.OPTIONS + + + + class-attribute + instance-attribute + + +
    +
    OPTIONS: ClassVar = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.LAST_EVENT_MISS + + + + class-attribute + instance-attribute + + +
    +
    LAST_EVENT_MISS: ClassVar = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.MISSING_EVENTS + + + + class-attribute + instance-attribute + + +
    +
    MISSING_EVENTS: ClassVar = []
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.UNIMPLEMENTED_EVENTS + + + + class-attribute + instance-attribute + + +
    +
    UNIMPLEMENTED_EVENTS: ClassVar = []
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.USE_FASTEVENTS + + + + class-attribute + instance-attribute + + +
    +
    USE_FASTEVENTS: ClassVar = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.EVENT_HANDLERS + + + + class-attribute + instance-attribute + + +
    +
    EVENT_HANDLERS: ClassVar = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.fps + + + + instance-attribute + + +
    +
    fps: float = get('fps', 0.0)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.update_type + + + + instance-attribute + + +
    +
    update_type = get('update_type')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.use_gfxdraw + + + + instance-attribute + + +
    +
    use_gfxdraw = get('use_gfxdraw')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.windowed + + + + instance-attribute + + +
    +
    windowed = get('windowed')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.fps_refresh_rate + + + + instance-attribute + + +
    +
    fps_refresh_rate = get('fps_refresh_rate')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.pygame_version + + + + instance-attribute + + +
    +
    pygame_version = {'major': 0, 'minor': 0, 'patch': 0}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.scene_manager + + + + instance-attribute + + +
    +
    scene_manager: SceneManager = SceneManager()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.mode_flags + + + + instance-attribute + + +
    +
    mode_flags: int = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.desired_resolution + + + + instance-attribute + + +
    +
    desired_resolution: tuple[int, int] = suggested_resolution(desired_width, desired_height)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.screen_width + + + + property + + +
    +
    screen_width: int
    +
    + +
    + +

    Get the screen width.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The screen width.

      +
      +
    • +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.screen_height + + + + property + + +
    +
    screen_height: int
    +
    + +
    + +

    Get the screen height.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The screen height.

      +
      +
    • +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.GameEngine.__init__ + + +
    +
    __init__(game: object, icon: Surface | Path | str = None) -> None
    +
    + +
    + +

    Initialize the game engine.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object) + – +
      +

      The game instance.

      +
      +
    • +
    • + icon + (Surface | Path | str, default: + None +) + – +
      +

      The game icon.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.initialize_display + + +
    +
    initialize_display() -> None
    +
    + +
    + +

    Initialize the display.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.initialize_event_handlers + + +
    +
    initialize_event_handlers() -> None
    +
    + +
    + +

    Initialize event handlers.

    +

    The engine calls this on your behalf.

    +

    Event subsystem bootstrapping

    +

    This gives us much faster event processing than +doing a lookup every time an event comes in since +we can just call the processing function directly.

    +

    It's not as fast as a raw pygame event loop, +but since we layer richer event types on top of +the pygame raw events, this gives us a nice balance +of extensibility with performance.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.initialize_input_event_handlers + + +
    +
    initialize_input_event_handlers() -> None
    +
    + +
    + +

    Initialize input event handlers.

    +

    The engine calls this on your behalf.

    +

    This initializes the input event handlers.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.__del__ + + +
    +
    __del__() -> None
    +
    + +
    + +

    Delete the game engine.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.print_system_info + + +
    +
    print_system_info() -> None
    +
    + +
    + +

    Print system information.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.print_game_info + + +
    +
    print_game_info() -> None
    +
    + +
    + +

    Print game information.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.suggested_resolution + + +
    +
    suggested_resolution(desired_width: int = 0, desired_height: int = 0) -> tuple[int, int]
    +
    + +
    + +

    Suggest a resolution.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + desired_width + (int, default: + 0 +) + – +
      +

      The desired width.

      +
      +
    • +
    • + desired_height + (int, default: + 0 +) + – +
      +

      The desired height.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + tuple[int, int] + – +
      +

      tuple[int, int]: The suggested resolution.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.set_cursor + + + + classmethod + + +
    +
    set_cursor(
    +    cursor: list[str], cursor_black: str = ".", cursor_white: str = "X", cursor_xor: str = "o"
    +) -> list[str]
    +
    + +
    + +

    Set the cursor.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + cursor + (list[str]) + – +
      +

      The cursor.

      +
      +
    • +
    • + cursor_black + (str, default: + '.' +) + – +
      +

      The black cursor.

      +
      +
    • +
    • + cursor_white + (str, default: + 'X' +) + – +
      +

      The white cursor.

      +
      +
    • +
    • + cursor_xor + (str, default: + 'o' +) + – +
      +

      The xor cursor.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + list[str] + – +
      +

      list[str]: The cursor.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.initialize_system_icons + + +
    +
    initialize_system_icons() -> None
    +
    + +
    + +

    Initialize system icons.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add Glitchy Games arguments to the argument parser.

    +

    All Glitchy Games will inherit these arguments.

    + +
    + Supported Arguments +

    -f, --target-fps +--fps-refresh-rate +-w, --windowed +-r, --resolution +--use-gfxdraw +--update-type +--video-driver

    +
    + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.start + + +
    +
    start() -> None
    +
    + +
    + +

    Start the game engine.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.quit_game + + + + classmethod + + +
    +
    quit_game() -> None
    +
    + +
    + +

    Quit the game.

    +

    Emits a pygame.event.Event(pygame.QUIT, {}) event.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_events + + +
    +
    process_events() -> bool
    +
    + +
    + +

    Process events.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_audio_event + + +
    +
    process_audio_event(event: Event) -> bool
    +
    + +
    + +

    Process an audio event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_controller_event + + +
    +
    process_controller_event(event: Event) -> bool
    +
    + +
    + +

    Process a controller event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_drop_event + + +
    +
    process_drop_event(event: Event) -> bool
    +
    + +
    + +

    Process a drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_touch_event + + +
    +
    process_touch_event(event: Event) -> bool
    +
    + +
    + +

    Process a touch event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_midi_event + + +
    +
    process_midi_event(event: Event) -> bool
    +
    + +
    + +

    Process a midi event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_mouse_event + + +
    +
    process_mouse_event(event: Event) -> bool
    +
    + +
    + +

    Process a mouse event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_keyboard_event + + +
    +
    process_keyboard_event(event: Event) -> bool
    +
    + +
    + +

    Process a keyboard event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_joystick_event + + +
    +
    process_joystick_event(event: Event) -> bool
    +
    + +
    + +

    Process a joystick event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_text_event + + +
    +
    process_text_event(event: Event) -> None
    +
    + +
    + +

    Process a text event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( None +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_window_focus_event + + +
    +
    process_window_focus_event(event: Event) -> bool
    +
    + +
    + +

    Process a window focus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_window_event + + +
    +
    process_window_event(event: Event) -> None
    +
    + +
    + +

    Process a window event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( None +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_game_event + + +
    +
    process_game_event(event: Event) -> None
    +
    + +
    + +

    Process a game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( None +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_unimplemented_event + + +
    +
    process_unimplemented_event(event: Event) -> None
    +
    + +
    + +

    Process an unimplemented event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.post_game_event + + +
    +
    post_game_event(event_subtype: EventType, event_data: dict) -> None
    +
    + +
    + +

    Post a game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event_subtype + (EventType) + – +
      +

      The event subtype.

      +
      +
    • +
    • + event_data + (dict) + – +
      +

      The event data.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.suppress_event + + +
    +
    suppress_event(*args, attr: str, **kwargs) -> None
    +
    + +
    + +

    Suppress an event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + *args + – +
      +

      The args.

      +
      +
    • +
    • + attr + (str) + – +
      +

      The attribute.

      +
      +
    • +
    • + **kwargs + – +
      +

      The kwargs.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.register_game_event + + +
    +
    register_game_event(event_type: EventType, callback: Callable) -> None
    +
    + +
    + +

    Register a game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event_type + (EventType) + – +
      +

      The event type.

      +
      +
    • +
    • + callback + (Callable) + – +
      +

      The callback.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.missing_event + + +
    +
    missing_event(*args, **kwargs) -> None
    +
    + +
    + +

    Suppress unhandled on_*_event methods.

    +

    We only want to log this once per event type.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + *args + – +
      +

      The args.

      +
      +
    • +
    • + **kwargs + – +
      +

      The kwargs.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.__getattr__ + + +
    +
    __getattr__(attr: str) -> Callable
    +
    + +
    + +

    Suppress unhandled on_*_event methods.

    +

    If the attribute being looked up is not an on_*_event +attribute, raise AttributeError as usual.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + attr + (str) + – +
      +

      The attribute to proxy.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +Callable( Callable +) – +
      +

      The callable object.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + + + + +
    + +
    + +

    This is some text

    + +
    +
    + +
    +
    + +
    + +
    + +
    + + + + + +
    + + + + + + + + + diff --git a/reference/glitchygames/scenes/index.html b/reference/glitchygames/scenes/index.html index e2e5ab7..67ce21f 100644 --- a/reference/glitchygames/scenes/index.html +++ b/reference/glitchygames/scenes/index.html @@ -677,49 +677,6 @@
    Attributes
    -
    - glitchygames.scenes.SceneManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.scenes.SceneManager.proxies - - - - instance-attribute - - -
    -
    proxies = [EventProxy(event_source=self)]
    -
    - -
    -
    - -
    - -
    - - -
    glitchygames.scenes.SceneManager.log @@ -1084,144 +1041,27 @@
    -
    -
    Classes
    - -
    - - - -
    - glitchygames.scenes.SceneManager.EventProxy - - -
    - - -
    - - -

    Proxy for events.

    - - - - -
    - - - - - -Attributes - -
    - - - - - glitchygames.scenes.SceneManager.EventProxy.log - - - - class-attribute - instance-attribute - - - -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.scenes.SceneManager.EventProxy.proxies - - - - instance-attribute - - - -
    proxies = []
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.scenes.SceneManager.EventProxy.event_source - - - - instance-attribute - - - -
    event_source = event_source
    -
    - -
    -
    -
    -Functions +
    Functions
    - - glitchygames.scenes.SceneManager.EventProxy.__init__ +
    + glitchygames.scenes.SceneManager.__init__ - -
    __init__(event_source: object) -> None
    +
    +
    __init__() -> None
     
    -

    Initialize the event proxy.

    - - +

    Initialize the scene manager.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event_source - (object) - – -
      -

      The event source.

      -
      -
    • -
    -
    @@ -1255,17 +1095,17 @@
    - - glitchygames.scenes.SceneManager.EventProxy.unhandled_event +
    + glitchygames.scenes.SceneManager.switch_to_scene - -
    unhandled_event(*args, **kwargs) -> None
    +
    +
    switch_to_scene(next_scene: Scene) -> None
     
    -

    Handle unhandled events.

    +

    Switch to the next scene.

    @@ -1280,17 +1120,11 @@
    - - -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs + next_scene + (Scene) –
      -

      The keyword arguments.

      +

      The next scene to switch to.

    @@ -1331,44 +1165,37 @@
    - - glitchygames.scenes.SceneManager.EventProxy.__getattr__ +
    + glitchygames.scenes.SceneManager.play - -
    __getattr__(attr: str) -> Callable
    +
    +
    play() -> None
     
    - -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +
    + + + +
    + + + +
    + glitchygames.scenes.SceneManager.start + + +
    +
    start() -> None
    +
    + +
    + +

    Start the scene manager.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    @@ -1382,10 +1209,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -1398,72 +1225,41 @@
    +
    + -
    - +
    + glitchygames.scenes.SceneManager.stop + + +
    +
    stop() -> None
    +
    + +
    +
    -
    Functions
    -
    - glitchygames.scenes.SceneManager.__new__ +
    + glitchygames.scenes.SceneManager.terminate
    -
    __new__(*args, **kwargs) -> object
    +
    terminate() -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    - - +

    Terminate the scene manager.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    @@ -1477,10 +1273,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -1488,30 +1284,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    @@ -1521,17 +1293,17 @@
    -
    - glitchygames.scenes.SceneManager.__init__ +
    + glitchygames.scenes.SceneManager.quit
    -
    __init__() -> None
    +
    quit() -> None
     
    -

    Initialize the scene manager.

    +

    Quit the game.

    @@ -1566,43 +1338,18 @@
    -
    - glitchygames.scenes.SceneManager.switch_to_scene +
    + glitchygames.scenes.SceneManager.quit_game
    -
    switch_to_scene(next_scene: Scene) -> None
    +
    quit_game() -> None
     
    -

    Switch to the next scene.

    - - +

    Quit the game.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - next_scene - (Scene) - – -
      -

      The next scene to switch to.

      -
      -
    • -
    -
    @@ -1636,36 +1383,17 @@
    - glitchygames.scenes.SceneManager.play - - -
    -
    play() -> None
    -
    - -
    - -
    - - - - -
    - - - -
    - glitchygames.scenes.SceneManager.start +
    + glitchygames.scenes.SceneManager.on_quit_event
    -
    start() -> None
    +
    on_quit_event(event: Event) -> None
     
    -

    Start the scene manager.

    +

    Handle quit events.

    @@ -1676,61 +1404,22 @@
    - - + +
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    -
    - -
    - - -
    - - - -
    - glitchygames.scenes.SceneManager.stop - - -
    -
    stop() -> None
    -
    - -
    - -
    - -
    - - -
    - - - -
    - glitchygames.scenes.SceneManager.terminate - - -
    -
    terminate() -> None
    -
    - -
    - -

    Terminate the scene manager.

    - @@ -1764,17 +1453,17 @@
    -
    - glitchygames.scenes.SceneManager.quit +
    + glitchygames.scenes.SceneManager.on_fps_event
    -
    quit() -> None
    +
    on_fps_event(event: Event) -> None
     
    -

    Quit the game.

    +

    Handle FPS events.

    @@ -1785,42 +1474,22 @@
    - - + +
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    -
    - -
    - - -
    - - - -
    - glitchygames.scenes.SceneManager.quit_game - - -
    -
    quit_game() -> None
    -
    - -
    - -

    Quit the game.

    - @@ -1854,17 +1523,17 @@
    -
    - glitchygames.scenes.SceneManager.on_quit_event +
    + glitchygames.scenes.SceneManager.on_game_event
    -
    on_quit_event(event: Event) -> None
    +
    on_game_event(event: Event) -> None
     
    -

    Handle quit events.

    +

    Handle game events.

    @@ -1924,17 +1593,17 @@
    -
    - glitchygames.scenes.SceneManager.on_fps_event +
    + glitchygames.scenes.SceneManager.register_game_event
    -
    on_fps_event(event: Event) -> None
    +
    register_game_event(event_type: EventType, callback: Callable) -> None
     
    -

    Handle FPS events.

    +

    Register a game event.

    @@ -1949,11 +1618,19 @@
    - - -
    • - event - (Event) + event_type + (EventType) –
      -

      The event to handle.

      +

      The event type to register.

      +
      +
    • +
    • + callback + (Callable) + – +
      +

      The callback to call when the event is triggered.

    @@ -1994,17 +1671,17 @@
    -
    - glitchygames.scenes.SceneManager.on_game_event +
    + glitchygames.scenes.SceneManager.__getattr__
    -
    on_game_event(event: Event) -> None
    +
    __getattr__(attr: str) -> Callable
     
    -

    Handle game events.

    +

    Proxy calls to the active scene.

    @@ -2019,11 +1696,11 @@
    • - event - (Event) + attr + (str) –
      -

      The event to handle.

      +

      The attribute to proxy.

    @@ -2044,156 +1721,8 @@
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.scenes.SceneManager.register_game_event - - -
    -
    register_game_event(event_type: EventType, callback: Callable) -> None
    -
    - -
    - -

    Register a game event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event_type - (EventType) - – -
      -

      The event type to register.

      -
      -
    • -
    • - callback - (Callable) - – -
      -

      The callback to call when the event is triggered.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.scenes.SceneManager.__getattr__ - - -
    -
    __getattr__(attr: str) -> Callable
    -
    - -
    - -

    Proxy calls to the active scene.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to proxy.

      -
      -
    • -
    -
    - - - - - - - - - - -
    Returns: -
      -
    • -Callable( Callable -) – +Callable( Callable +) –

      The callable object.

      @@ -2793,2727 +2322,6 @@
      Functions
      -
      - glitchygames.scenes.Scene.__subclasshook__ - - - - classmethod - - -
      -
      __subclasshook__(subclass: object) -> bool
      -
      - -
      - -

      Override the default subclasshook to create an interface.

      - -
      - - - - -
      - - - -
      - glitchygames.scenes.Scene.on_mouse_motion_event - - - - cached - - -
      -
      on_mouse_motion_event(event: Event) -> None
      -
      - -
      - -

      Handle mouse motion events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_mouse_focus_event - - - - cached - - -
      -
      on_mouse_focus_event(event: Event, entering_focus: object) -> None
      -
      - -
      - -

      Handle mouse focus events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - entering_focus - (object) - – -
        -

        The object that is entering focus.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_mouse_unfocus_event - - - - cached - - -
      -
      on_mouse_unfocus_event(event: Event, leaving_focus: object) -> None
      -
      - -
      - -

      Handle mouse unfocus events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - leaving_focus - (object) - – -
        -

        The object that is leaving focus.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_mouse_button_up_event - - - - cached - - -
      -
      on_mouse_button_up_event(event: Event) -> None
      -
      - -
      - -

      Handle mouse button up events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_mouse_button_down_event - - - - cached - - -
      -
      on_mouse_button_down_event(event: Event) -> None
      -
      - -
      - -

      Handle mouse button down events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_mouse_scroll_down_event - - - - cached - - -
      -
      on_mouse_scroll_down_event(event: Event) -> None
      -
      - -
      - -

      Handle mouse scroll down events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_mouse_scroll_up_event - - - - cached - - -
      -
      on_mouse_scroll_up_event(event: Event) -> None
      -
      - -
      - -

      Handle mouse scroll up events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_mouse_wheel_event - - - - cached - - -
      -
      on_mouse_wheel_event(event: Event) -> None
      -
      - -
      - -

      Handle mouse wheel events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_key_down_event - - - - cached - - -
      -
      on_key_down_event(event: Event) -> None
      -
      - -
      - -

      Handle key down events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_key_chord_up_event - - - - cached - - -
      -
      on_key_chord_up_event(event: Event, keys: list) -> None
      -
      - -
      - -

      Handle key chord up events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - keys - (list) - – -
        -

        The keys in the chord.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_key_chord_down_event - - - - cached - - -
      -
      on_key_chord_down_event(event: Event, keys: list) -> None
      -
      - -
      - -

      Handle key chord down events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - keys - (list) - – -
        -

        The keys in the chord.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_joy_axis_motion_event - - - - cached - - -
      -
      on_joy_axis_motion_event(event: Event) -> None
      -
      - -
      - -

      Handle joystick axis motion events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_joy_hat_motion_event - - - - cached - - -
      -
      on_joy_hat_motion_event(event: Event) -> None
      -
      - -
      - -

      Handle joystick hat motion events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_joy_ball_motion_event - - - - cached - - -
      -
      on_joy_ball_motion_event(event: Event) -> None
      -
      - -
      - -

      Handle joystick ball motion events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_joy_device_added_event - - - - cached - - -
      -
      on_joy_device_added_event(event: Event) -> None
      -
      - -
      - -

      Handle joystick device added events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_joy_device_removed_event - - - - cached - - -
      -
      on_joy_device_removed_event(event: Event) -> None
      -
      - -
      - -

      Handle joystick device removed events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_active_event - - - - cached - - -
      -
      on_active_event(event: Event) -> None
      -
      - -
      - -

      Handle active events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_game_event - - - - cached - - -
      -
      on_game_event(event: Event) -> None
      -
      - -
      - -

      Handle game events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_menu_item_event - - - - cached - - -
      -
      on_menu_item_event(event: Event) -> None
      -
      - -
      - -

      Handle menu item events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_font_changed_event - - - - cached - - -
      -
      on_font_changed_event(event: Event) -> None
      -
      - -
      - -

      Handle font changed events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_multi_touch_down_event - - - - cached - - -
      -
      on_multi_touch_down_event(event: Event) -> None
      -
      - -
      - -

      Handle multi finger down event.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The pygame event.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_multi_touch_motion_event - - - - cached - - -
      -
      on_multi_touch_motion_event(event: Event) -> None
      -
      - -
      - -

      Handle multi finger motion event.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The pygame event.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_multi_touch_up_event - - - - cached - - -
      -
      on_multi_touch_up_event(event: Event) -> None
      -
      - -
      - -

      Handle multi finger up event.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The pygame event.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_drop_begin_event - - - - cached - - -
      -
      on_drop_begin_event(event: Event) -> None
      -
      - -
      - -

      Handle drop begin event.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The pygame event.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_drop_file_event - - - - cached - - -
      -
      on_drop_file_event(event: Event) -> None
      -
      - -
      - -

      Handle drop file event.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The pygame event.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_drop_text_event - - - - cached - - -
      -
      on_drop_text_event(event: Event) -> None
      -
      - -
      - -

      Handle drop text event.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The pygame event.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_drop_complete_event - - - - cached - - -
      -
      on_drop_complete_event(event: Event) -> None
      -
      - -
      - -

      Handle drop complete event.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The pygame event.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_controller_axis_motion_event - - - - cached - - -
      -
      on_controller_axis_motion_event(event: Event) -> None
      -
      - -
      - -

      Handle controller axis motion events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_controller_device_added_event - - - - cached - - -
      -
      on_controller_device_added_event(event: Event) -> None
      -
      - -
      - -

      Handle controller device added events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_controller_device_remapped_event - - - - cached - - -
      -
      on_controller_device_remapped_event(event: Event) -> None
      -
      - -
      - -

      Handle controller device remapped events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_controller_device_removed_event - - - - cached - - -
      -
      on_controller_device_removed_event(event: Event) -> None
      -
      - -
      - -

      Handle controller device removed events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_controller_touchpad_down_event - - - - cached - - -
      -
      on_controller_touchpad_down_event(event: Event) -> None
      -
      - -
      - -

      Handle controller touchpad down events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_controller_touchpad_motion_event - - - - cached - - -
      -
      on_controller_touchpad_motion_event(event: Event) -> None
      -
      - -
      - -

      Handle controller touchpad motion events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_controller_touchpad_up_event - - - - cached - - -
      -
      on_controller_touchpad_up_event(event: Event) -> None
      -
      - -
      - -

      Handle controller touchpad up events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_audio_device_added_event - - - - cached - - -
      -
      on_audio_device_added_event(event: Event) -> None
      -
      - -
      - -

      Handle audio device added events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - - -
      - glitchygames.scenes.Scene.on_audio_device_removed_event - - - - cached - - -
      -
      on_audio_device_removed_event(event: Event) -> None
      -
      - -
      - -

      Handle audio device removed events.

      - - - - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      - - - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      - -
      - - -
      - - -
      glitchygames.scenes.Scene.__init__ diff --git a/reference/glitchygames/sprites/index.html b/reference/glitchygames/sprites/index.html index ef5bd34..cc0dd1a 100644 --- a/reference/glitchygames/sprites/index.html +++ b/reference/glitchygames/sprites/index.html @@ -392,31 +392,6 @@
      Functions
      -
      - glitchygames.sprites.MouseEvents.__subclasshook__ - - - - classmethod - - -
      -
      __subclasshook__(subclass: object) -> bool
      -
      - -
      - -

      Override the default subclasshook to create an interface.

      - -
      - -
      - - -
      - - -
      glitchygames.sprites.MouseEvents.on_mouse_motion_event @@ -2207,46 +2182,17 @@
      Functions
      -
      - glitchygames.sprites.RootSprite.__subclasshook__ - - - - classmethod - - -
      -
      __subclasshook__(subclass: object) -> bool
      -
      - -
      - -

      Override the default subclasshook to create an interface.

      - -
      - -
      - - -
      - - - -
      - glitchygames.sprites.RootSprite.on_mouse_motion_event +
      + glitchygames.sprites.RootSprite.__init__ - - - abstractmethod -
      -
      on_mouse_motion_event(event: Event) -> None
      +
      __init__(groups: LayeredDirty | None = None) -> None
       
      -

      Handle mouse motion events.

      +

      Initialize a RootSprite.

      @@ -2261,11 +2207,13 @@
      • - event - (Event) + groups + (LayeredDirty | None, default: + None +) –
        -

        The event to handle.

        +

        The sprite groups to add the sprite to.

      @@ -2302,551 +2250,427 @@
      +
      +
      -
      - glitchygames.sprites.RootSprite.on_mouse_drag_event - - - abstractmethod - +
      + +
      + + + +

      + glitchygames.sprites.Sprite + + +

      - -
      on_mouse_drag_event(event: Event, trigger: object) -> None
      -
      +

      + Bases: RootSprite

      + -

      Handle mouse drag events.

      +

      A convenience class for handling all of the common sprite behaviors.

      + - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      +
      - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      -
      -
      -
      +
      Attributes
      + +
      -
      - glitchygames.sprites.RootSprite.on_mouse_drop_event +
      + glitchygames.sprites.Sprite.log - abstractmethod + class-attribute + instance-attribute
      -
      on_mouse_drop_event(event: Event, trigger: object) -> None
      +
      log = LOG
       
      - -

      Handle mouse drop events.

      +
      +
      +
      - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      +
      + glitchygames.sprites.Sprite.USE_GFXDRAW + + + + class-attribute + instance-attribute + + +
      +
      USE_GFXDRAW: ClassVar = False
      +
      + +
      - -
      +
      -
      - glitchygames.sprites.RootSprite.on_left_mouse_drag_event +
      + glitchygames.sprites.Sprite.PROXIES - abstractmethod + class-attribute + instance-attribute
      -
      on_left_mouse_drag_event(event: Event, trigger: object) -> None
      +
      PROXIES: ClassVar = [sprite]
       
      - -

      Handle left mouse drag events.

      +
      +
      +
      - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      +
      + glitchygames.sprites.Sprite.SPRITE_BREAKPOINTS + + + + class-attribute + instance-attribute + + +
      +
      SPRITE_BREAKPOINTS: ClassVar = None
      +
      + +
      - -
      +
      -
      - glitchygames.sprites.RootSprite.on_left_mouse_drop_event +
      + glitchygames.sprites.Sprite.SPRITE_COUNTERS - abstractmethod + class-attribute + instance-attribute
      -
      on_left_mouse_drop_event(event: Event, trigger: object) -> None
      +
      SPRITE_COUNTERS: ClassVar = OrderedDict()
       
      - -

      Handle left mouse drop events.

      +
      +
      +
      - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      +
      + glitchygames.sprites.Sprite.SPRITE_COUNT + + + + class-attribute + instance-attribute + + +
      +
      SPRITE_COUNT = 0
      +
      + +
      - -
      +
      -
      - glitchygames.sprites.RootSprite.on_middle_mouse_drag_event +
      + glitchygames.sprites.Sprite.image - abstractmethod + instance-attribute
      -
      on_middle_mouse_drag_event(event: Event, trigger: object) -> None
      +
      image = Surface((width, height))
       
      - -

      Handle middle mouse drag events.

      +
      +
      +
      - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      +
      + glitchygames.sprites.Sprite.rect + + + + instance-attribute + + +
      +
      rect = get_rect()
      +
      + +
      - -
      +
      -
      - glitchygames.sprites.RootSprite.on_middle_mouse_drop_event +
      + glitchygames.sprites.Sprite.dt - abstractmethod + instance-attribute
      -
      on_middle_mouse_drop_event(event: Event, trigger: object) -> None
      +
      dt = 0
       
      +
      + +
      + +
      + + + +
      + glitchygames.sprites.Sprite.dt_timer + -

      Handle middle mouse drop events.

      + + instance-attribute + +
      +
      dt_timer = 0
      +
      +
      +
      - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      +
      +
      - - - - - - - - - - - -
      Returns: -
        -
      • - None - – -
        -

        None

        -
        -
      • -
      -
      + + +
      + glitchygames.sprites.Sprite.name + + + + instance-attribute + + +
      +
      name = name
      +
      + +
      +
      + -
      +
      + glitchygames.sprites.Sprite.parent + + + + instance-attribute + + +
      +
      parent = parent
      +
      + +
      +
      + +
      + +
      -
      - glitchygames.sprites.RootSprite.on_right_mouse_drag_event + +
      + glitchygames.sprites.Sprite.proxies - abstractmethod + instance-attribute
      -
      on_right_mouse_drag_event(event: Event, trigger: object) -> None
      +
      proxies = [self]
       
      +
      + +
      + +
      + + + +
      + glitchygames.sprites.Sprite.callbacks + -

      Handle right mouse drag events.

      + + instance-attribute + +
      +
      callbacks = {}
      +
      +
      +
      + +
      + +
      + + + +
      + glitchygames.sprites.Sprite.screen + + + + instance-attribute + + +
      +
      screen = get_surface()
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.sprites.Sprite.screen_width + + + + instance-attribute + + +
      +
      screen_width = get_width()
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.sprites.Sprite.screen_height + + + + instance-attribute + + +
      +
      screen_height = get_height()
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.sprites.Sprite.width + + + + property + writable + + +
      +
      width: int
      +
      + +
      + +

      Return the width of the sprite.

      - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      @@ -2860,77 +2684,43 @@
      • - None - – +int( int +) –
        -

        None

        +

        The width of the sprite.

      -
      -
      +
    - -
    +
    -
    - glitchygames.sprites.RootSprite.on_right_mouse_drop_event +
    + glitchygames.sprites.Sprite.height - abstractmethod + property + writable
    -
    on_right_mouse_drop_event(event: Event, trigger: object) -> None
    +
    height: int
     
    -

    Handle right mouse drop events.

    +

    Return the height of the sprite.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - @@ -2942,41 +2732,42 @@
    • - None - – +int( int +) –
      -

      None

      +

      The height of the sprite.

    -
    -
    +
    +
    Functions
    +
    -
    - glitchygames.sprites.RootSprite.on_mouse_focus_event +
    + glitchygames.sprites.Sprite.break_when - abstractmethod + classmethod
    -
    on_mouse_focus_event(event: Event, entering_focus: object) -> None
    +
    break_when(sprite_type: object | None = None) -> None
     
    -

    Handle mouse focus events.

    +

    Register a breakpoint for a sprite type.

    @@ -2991,19 +2782,13 @@
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - entering_focus - (object) + sprite_type + (object | None, default: + None +) –
      -

      The object that is entering focus.

      +

      The sprite type to break on.

    @@ -3044,21 +2829,25 @@
    - glitchygames.sprites.RootSprite.on_mouse_unfocus_event +
    + glitchygames.sprites.Sprite.__init__ - - - abstractmethod -
    -
    on_mouse_unfocus_event(event: Event, leaving_focus: object) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle mouse unfocus events.

    +

    Initialize a Sprite.

    @@ -3073,19 +2862,65 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the sprite.

    • - leaving_focus - (object) + y + (int) –
      -

      The object that is leaving focus.

      +

      The y coordinate of the sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the sprite.

      +
      +
    • +
    • + name + (str | None, default: + None +) + – +
      +

      The name of the sprite.

      +
      +
    • +
    • + parent + (object | None, default: + None +) + – +
      +

      The parent of the sprite.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -3126,21 +2961,17 @@
    - glitchygames.sprites.RootSprite.on_mouse_button_up_event +
    + glitchygames.sprites.Sprite.dt_tick - - - abstractmethod -
    -
    on_mouse_button_up_event(event: Event) -> None
    +
    dt_tick(dt: float) -> None
     
    -

    Handle mouse button up events.

    +

    Update the sprite's delta time.

    @@ -3155,11 +2986,11 @@
    • - event - (Event) + dt + (float) –
      -

      The event to handle.

      +

      The new delta time.

    @@ -3200,47 +3031,18 @@
    - glitchygames.sprites.RootSprite.on_left_mouse_button_up_event +
    + glitchygames.sprites.Sprite.update - - - abstractmethod -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    +
    update() -> None
     
    -

    Handle left mouse button up events.

    - - +

    Update the sprite.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -3274,21 +3076,17 @@
    - glitchygames.sprites.RootSprite.on_middle_mouse_button_up_event +
    + glitchygames.sprites.Sprite.on_joy_axis_motion_event - - - abstractmethod -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    on_joy_axis_motion_event(event: Event) -> None
     
    -

    Handle middle mouse button up events.

    +

    Handle a joystick axis motion event.

    @@ -3348,21 +3146,17 @@
    - glitchygames.sprites.RootSprite.on_right_mouse_button_up_event +
    + glitchygames.sprites.Sprite.on_joy_button_down_event - - - abstractmethod -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    +
    on_joy_button_down_event(event: Event) -> None
     
    -

    Handle right mouse button up events.

    +

    Handle a joystick button down event.

    @@ -3422,21 +3216,17 @@
    - glitchygames.sprites.RootSprite.on_mouse_button_down_event +
    + glitchygames.sprites.Sprite.on_joy_button_up_event - - - abstractmethod -
    -
    on_mouse_button_down_event(event: Event) -> None
    +
    on_joy_button_up_event(event: Event) -> None
     
    -

    Handle mouse button down events.

    +

    Handle a joystick button up event.

    @@ -3496,21 +3286,17 @@
    - glitchygames.sprites.RootSprite.on_left_mouse_button_down_event +
    + glitchygames.sprites.Sprite.on_joy_hat_motion_event - - - abstractmethod -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    +
    on_joy_hat_motion_event(event: Event) -> None
     
    -

    Handle left mouse button down events.

    +

    Handle a joystick hat motion event.

    @@ -3570,21 +3356,17 @@
    - glitchygames.sprites.RootSprite.on_middle_mouse_button_down_event +
    + glitchygames.sprites.Sprite.on_joy_ball_motion_event - - - abstractmethod -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    on_joy_ball_motion_event(event: Event) -> None
     
    -

    Handle middle mouse button down events.

    +

    Handle a joystick ball motion event.

    @@ -3644,21 +3426,17 @@
    - glitchygames.sprites.RootSprite.on_right_mouse_button_down_event +
    + glitchygames.sprites.Sprite.on_mouse_motion_event - - - abstractmethod -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    +
    on_mouse_motion_event(event: Event) -> None
     
    -

    Handle right mouse button down events.

    +

    Handle a mouse motion event.

    @@ -3718,21 +3496,17 @@
    - glitchygames.sprites.RootSprite.on_mouse_scroll_down_event +
    + glitchygames.sprites.Sprite.on_mouse_focus_event - - - abstractmethod -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    +
    on_mouse_focus_event(event: Event, old_focus: object) -> None
     
    -

    Handle mouse scroll down events.

    +

    Handle a mouse focus event.

    @@ -3754,10 +3528,18 @@
    +

    The old focus.

    +
    + + + + +
    @@ -3792,21 +3574,17 @@
    - glitchygames.sprites.RootSprite.on_mouse_scroll_up_event +
    + glitchygames.sprites.Sprite.on_mouse_unfocus_event - - - abstractmethod -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    +
    on_mouse_unfocus_event(event: Event) -> None
     
    -

    Handle mouse scroll up events.

    +

    Handle a mouse unfocus event.

    @@ -3866,21 +3644,17 @@
    - glitchygames.sprites.RootSprite.on_mouse_wheel_event +
    + glitchygames.sprites.Sprite.on_mouse_enter_event - - - abstractmethod -
    -
    on_mouse_wheel_event(event: Event) -> None
    +
    on_mouse_enter_event(event: Event) -> None
     
    -

    Handle mouse wheel events.

    +

    Handle a mouse enter event.

    @@ -3940,17 +3714,17 @@
    - glitchygames.sprites.RootSprite.__init__ +
    + glitchygames.sprites.Sprite.on_mouse_exit_event
    -
    __init__(groups: LayeredDirty | None = None) -> None
    +
    on_mouse_exit_event(event: Event) -> None
     
    -

    Initialize a RootSprite.

    +

    Handle a mouse exit event.

    @@ -3965,13 +3739,11 @@
    • - groups - (LayeredDirty | None, default: - None -) + event + (Event) –
      -

      The sprite groups to add the sprite to.

      +

      The event to handle.

    @@ -4008,14224 +3780,177 @@
    - - - - - - - - -
    - +
    -

    - glitchygames.sprites.Sprite +

    + glitchygames.sprites.Sprite.on_mouse_drag_down_event -
    +
    +
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    -

    - Bases: RootSprite

    - - -

    A convenience class for handling all of the common sprite behaviors.

    - - - -
    - - - - - -
    Attributes
    - -
    - +

    Handle a mouse drag down event.

    -
    - glitchygames.sprites.Sprite.log - - - class-attribute - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    -
    -
    log = LOG
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.sprites.Sprite.USE_GFXDRAW - - - class-attribute - instance-attribute - +
    + glitchygames.sprites.Sprite.on_left_mouse_drag_down_event +
    -
    USE_GFXDRAW: ClassVar = False
    +
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
     
    -
    - -
    - -
    - + +

    Handle a left mouse drag down event.

    -
    - glitchygames.sprites.Sprite.PROXIES - - - class-attribute - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    -
    -
    PROXIES: ClassVar = [sprite]
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.sprites.Sprite.SPRITE_BREAKPOINTS - - - class-attribute - instance-attribute - +
    + glitchygames.sprites.Sprite.on_left_mouse_drag_up_event +
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    +
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
     
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.proxies - - - - instance-attribute - - -
    -
    proxies = [self]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.width - - - - property - writable - - -
    -
    width: int
    -
    - -
    - -

    Return the width of the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The width of the sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.Sprite.height - - - - property - writable - - -
    -
    height: int
    -
    - -
    - -

    Return the height of the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The height of the sprite.

      -
      -
    • -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.sprites.Sprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a Sprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the sprite.

      -
      -
    • -
    • - name - (str | None, default: - None -) - – -
      -

      The name of the sprite.

      -
      -
    • -
    • - parent - (object | None, default: - None -) - – -
      -

      The parent of the sprite.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.Sprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.sprites.BitmappySprite - - -

    - - -
    -

    - Bases: Sprite

    - - -

    A sprite that loads from a Bitmappy config file.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.BitmappySprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    filename: str | None = None,
    -    focusable: bool = False,
    -    parent: object = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Subclass to load sprite files.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      the x coordinate of the sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      the y coordinate of the sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - name - (str | None, default: - None -) - – -
      -

      optional, the name of the sprite.

      -
      -
    • -
    • - filename - (str | None, default: - None -) - – -
      -

      optional, the BitmappySprite config to load.

      -
      -
    • -
    • - focusable - (bool, default: - False -) - – -
      -

      optional, whether or not the sprite can receive focus.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      optional, the parent of the sprite.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      optional, the sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.BitmappySprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.sprites.Singleton - - -

    - - -
    - - -

    A generic singleton class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.sprites.Singleton.__instance__ - - - - class-attribute - instance-attribute - - -
    -
    __instance__ = None
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.sprites.Singleton.__new__ - - -
    -
    __new__(*args, **kwargs) -> Self
    -
    - -
    - -

    Create a new instance of the Singleton.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - *args - – -
      -

      The arguments to pass to the constructor.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments to pass to the constructor.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • -Singleton( Self -) – -
      -

      The instance of the Singleton.

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.sprites.SingletonBitmappySprite - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A singleton class for handling singleton sprites, like mouse pointers.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.__instance__ - - - - class-attribute - instance-attribute - - -
    -
    __instance__ = None
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.__new__ - - -
    -
    __new__(*args, **kwargs) -> Self
    -
    - -
    - -

    Create a new instance of the SingletonBitmappySprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - *args - – -
      -

      The arguments to pass to the constructor.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments to pass to the constructor.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • -SingletonBitmappySprite( Self -) – -
      -

      The instance of the SingletonBitmappySprite.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.SingletonBitmappySprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize the SingletonBitmappySprite.

    + +

    Handle a left mouse drag up event.

    @@ -18240,708 +3965,752 @@
    • - x - (int) - – -
      -

      The x coordinate of the sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the sprite.

      -
      -
    • -
    • - name - (str, default: - None -) + event + (Event) –
      -

      The name of the sprite.

      +

      The event to handle.

    • - groups - (LayeredDirty, default: - None -) + trigger + (object | None) –
      -

      The sprite groups to add the sprite to.

      +

      The object that triggered the event.

      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.sprites.FocusableSingletonBitmappySprite - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A singleton class for handling all of the focusable sprite behaviors.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - + + + + + + -
    -
    USE_GFXDRAW: ClassVar = False
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.SPRITE_BREAKPOINTS +
    + glitchygames.sprites.Sprite.on_middle_mouse_drag_down_event - - - class-attribute - instance-attribute -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    +
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
     
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.SPRITE_COUNTERS - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - +

    Handle a middle mouse drag down event.

    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.SPRITE_COUNT - - - class-attribute - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    -
    -
    SPRITE_COUNT = 0
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.dt_timer +
    + glitchygames.sprites.Sprite.on_middle_mouse_drag_up_event - - - instance-attribute -
    -
    dt_timer = 0
    +
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
     
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.name - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - +

    Handle a middle mouse drag up event.

    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.parent - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    -
    -
    parent = parent
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.proxies - - - instance-attribute - +
    + glitchygames.sprites.Sprite.on_right_mouse_drag_down_event +
    -
    proxies = [parent]
    +
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
     
    -
    - -
    - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.callbacks - - - instance-attribute - +

    Handle a right mouse drag down event.

    +

    Args: +event (pygame.event.Event): The event to handle. +trigger (object | None): The object that triggered the event.

    -
    -
    callbacks = {}
    -
    -
    + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    + +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.screen +
    + glitchygames.sprites.Sprite.on_right_mouse_drag_up_event - - - instance-attribute -
    -
    screen = get_surface()
    +
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
     
    -
    - -
    - -
    - + +

    Handle a right mouse drag up event.

    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.screen_width - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    -
    -
    screen_width = get_width()
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    + +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.screen_height +
    + glitchygames.sprites.Sprite.on_mouse_drag_up_event - - - instance-attribute -
    -
    screen_height = get_height()
    +
    on_mouse_drag_up_event(event: Event) -> None
     
    -
    - -
    - -
    - + +

    Handle a mouse drag up event.

    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.width - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    -
    -
    width = width
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    + +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.height +
    + glitchygames.sprites.Sprite.on_mouse_button_up_event - - - instance-attribute -
    -
    height = height
    +
    on_mouse_button_up_event(event: Event) -> None
     
    -
    - -
    - -
    - + +

    Handle a mouse button up event.

    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.DEBUG - - - class-attribute - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    -
    -
    DEBUG = False
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.DEFAULT_SURFACE_W - - - class-attribute - instance-attribute - +
    + glitchygames.sprites.Sprite.on_left_mouse_button_up_event +
    -
    DEFAULT_SURFACE_W = 42
    +
    on_left_mouse_button_up_event(event: Event) -> None
     
    -
    - -
    - -
    - + +

    Handle a left mouse button up event.

    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.DEFAULT_SURFACE_H - - - class-attribute - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    -
    -
    DEFAULT_SURFACE_H = 42
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.DEFAULT_SURFACE - - - class-attribute - instance-attribute - +
    + glitchygames.sprites.Sprite.on_middle_mouse_button_up_event +
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    +
    on_middle_mouse_button_up_event(event: Event) -> None
     
    -
    - -
    - -
    - + +

    Handle a middle mouse button up event.

    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.filename - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    -
    -
    filename = filename
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.focusable - - - instance-attribute - +
    + glitchygames.sprites.Sprite.on_right_mouse_button_up_event +
    -
    focusable = focusable
    +
    on_right_mouse_button_up_event(event: Event) -> None
     
    -
    - -
    - -
    - + +

    Handle a right mouse button up event.

    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.__instance__ - - - class-attribute - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    -
    -
    __instance__ = None
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    Functions
    -
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.__subclasshook__ +
    + glitchygames.sprites.Sprite.on_mouse_button_down_event - - - classmethod -
    -
    __subclasshook__(subclass: object) -> bool
    +
    on_mouse_button_down_event(event: Event) -> None
     
    -

    Override the default subclasshook to create an interface.

    +

    Handle a mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -18951,17 +4720,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_motion_event +
    + glitchygames.sprites.Sprite.on_left_mouse_button_down_event
    -
    on_mouse_motion_event(event: Event) -> None
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a mouse motion event.

    +

    Handle a left mouse button down event.

    @@ -19021,17 +4790,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_drag_event +
    + glitchygames.sprites.Sprite.on_middle_mouse_button_down_event
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_middle_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a mouse drag event.

    +

    Handle a middle mouse button down event.

    @@ -19053,14 +4822,6 @@
    -

    The object that triggered the event.

    -
    - @@ -19099,17 +4860,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_drop_event +
    + glitchygames.sprites.Sprite.on_right_mouse_button_down_event
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_right_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a mouse drop event.

    +

    Handle a right mouse button down event.

    @@ -19131,14 +4892,6 @@
    -

    The object that triggered the event.

    -
    - @@ -19177,17 +4930,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_left_mouse_drag_event +
    + glitchygames.sprites.Sprite.on_mouse_scroll_down_event
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_scroll_down_event(event: Event) -> None
     
    -

    Handle a left mouse drag event.

    +

    Handle a mouse scroll down event.

    @@ -19209,14 +4962,6 @@
    -

    The object that triggered the event.

    -
    - @@ -19255,17 +5000,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_left_mouse_drop_event +
    + glitchygames.sprites.Sprite.on_mouse_scroll_up_event
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_scroll_up_event(event: Event) -> None
     
    -

    Handle a left mouse drop event.

    +

    Handle a mouse scroll up event.

    @@ -19287,14 +5032,6 @@
    -

    The object that triggered the event.

    -
    - @@ -19333,17 +5070,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_middle_mouse_drag_event +
    + glitchygames.sprites.Sprite.on_mouse_chord_up_event
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_chord_up_event(event: Event) -> None
     
    -

    Handle a middle mouse drag event.

    +

    Handle a mouse chord up event.

    @@ -19365,14 +5102,6 @@
    -

    The object that triggered the event.

    -
    - @@ -19411,17 +5140,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_middle_mouse_drop_event +
    + glitchygames.sprites.Sprite.on_mouse_chord_down_event
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_chord_down_event(event: Event) -> None
     
    -

    Handle a middle mouse drop event.

    +

    Handle a mouse chord down event.

    @@ -19443,14 +5172,6 @@
    -

    The object that triggered the event.

    -
    - @@ -19489,17 +5210,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_right_mouse_drag_event +
    + glitchygames.sprites.Sprite.on_key_down_event
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_key_down_event(event: Event) -> None
     
    -

    Handle a right mouse drag event.

    +

    Handle a key down event.

    @@ -19521,14 +5242,6 @@
    -

    The object that triggered the event.

    -
    - @@ -19567,17 +5280,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_right_mouse_drop_event +
    + glitchygames.sprites.Sprite.on_key_up_event
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_key_up_event(event: Event) -> None
     
    -

    Handle a right mouse drop event.

    +

    Handle a key up event.

    @@ -19599,14 +5312,6 @@
    -

    The object that triggered the event.

    -
    - @@ -19645,17 +5350,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_focus_event +
    + glitchygames.sprites.Sprite.on_key_chord_down_event
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    +
    on_key_chord_down_event(event: Event, keys: list) -> None
     
    -

    Handle a mouse focus event.

    +

    Handle a key chord down event.

    @@ -19678,11 +5383,11 @@
    -

    The old focus.

    +

    The keys that were pressed.

    @@ -19723,17 +5428,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_unfocus_event +
    + glitchygames.sprites.Sprite.on_key_chord_up_event
    -
    on_mouse_unfocus_event(event: Event) -> None
    +
    on_key_chord_up_event(event: Event, keys: list) -> None
     
    -

    Handle a mouse unfocus event.

    +

    Handle a key chord up event.

    @@ -19755,6 +5460,14 @@
    +

    The keys that were pressed.

    +
    + @@ -19793,17 +5506,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_button_up_event +
    + glitchygames.sprites.Sprite.on_quit_event
    -
    on_mouse_button_up_event(event: Event) -> None
    +
    on_quit_event(event: Event) -> None
     
    -

    Handle a mouse button up event.

    +

    Handle a quit event.

    @@ -19863,17 +5576,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_left_mouse_button_up_event +
    + glitchygames.sprites.Sprite.on_active_event
    -
    on_left_mouse_button_up_event(event: Event) -> None
    +
    on_active_event(event: Event) -> None
     
    -

    Handle a left mouse button up event.

    +

    Handle an active event.

    @@ -19933,17 +5646,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_middle_mouse_button_up_event +
    + glitchygames.sprites.Sprite.on_video_resize_event
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    on_video_resize_event(event: Event) -> None
     
    -

    Handle a middle mouse button up event.

    +

    Handle a video resize event.

    @@ -20003,17 +5716,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_right_mouse_button_up_event +
    + glitchygames.sprites.Sprite.on_video_expose_event
    -
    on_right_mouse_button_up_event(event: Event) -> None
    +
    on_video_expose_event(event: Event) -> None
     
    -

    Handle a right mouse button up event.

    +

    Handle a video expose event.

    @@ -20073,17 +5786,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_button_down_event +
    + glitchygames.sprites.Sprite.on_sys_wm_event
    -
    on_mouse_button_down_event(event: Event) -> None
    +
    on_sys_wm_event(event: Event) -> None
     
    -

    Handle a mouse button down event.

    +

    Handle a sys wm event.

    @@ -20143,17 +5856,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_left_mouse_button_down_event +
    + glitchygames.sprites.Sprite.on_user_event
    -
    on_left_mouse_button_down_event(event: Event) -> None
    +
    on_user_event(event: Event) -> None
     
    -

    Handle a left mouse button down event.

    +

    Handle a user event.

    @@ -20213,17 +5926,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_middle_mouse_button_down_event +
    + glitchygames.sprites.Sprite.on_left_mouse_drag_event
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a middle mouse button down event.

    +

    Handle a left mouse drag event.

    @@ -20245,6 +5958,14 @@
    +

    The object that triggered the event.

    +
    + @@ -20283,17 +6004,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_right_mouse_button_down_event +
    + glitchygames.sprites.Sprite.on_middle_mouse_drag_event
    -
    on_right_mouse_button_down_event(event: Event) -> None
    +
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a right mouse button down event.

    +

    Handle a middle mouse drag event.

    @@ -20315,6 +6036,14 @@
    +

    The object that triggered the event.

    +
    + @@ -20353,17 +6082,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_scroll_down_event +
    + glitchygames.sprites.Sprite.on_right_mouse_drag_event
    -
    on_mouse_scroll_down_event(event: Event) -> None
    +
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse scroll down event.

    +

    Handle a right mouse drag event.

    @@ -20385,6 +6114,14 @@
    +

    The object that triggered the event.

    +
    + @@ -20423,17 +6160,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_scroll_up_event +
    + glitchygames.sprites.Sprite.on_left_mouse_drop_event
    -
    on_mouse_scroll_up_event(event: Event) -> None
    +
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse scroll up event.

    +

    Handle a left mouse drop event.

    @@ -20455,6 +6192,14 @@
    +

    The object that triggered the event.

    +
    + @@ -20493,17 +6238,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_wheel_event +
    + glitchygames.sprites.Sprite.on_middle_mouse_drop_event
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    +
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse wheel event.

    +

    Handle a middle mouse drop event.

    @@ -20571,21 +6316,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.break_when +
    + glitchygames.sprites.Sprite.on_right_mouse_drop_event - - - classmethod -
    -
    break_when(sprite_type: object | None = None) -> None
    +
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Register a breakpoint for a sprite type.

    +

    Handle a right mouse drop event.

    @@ -20600,13 +6341,19 @@
    • - sprite_type - (object | None, default: - None -) + event + (Event) –
      -

      The sprite type to break on.

      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

    @@ -20647,17 +6394,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.dt_tick +
    + glitchygames.sprites.Sprite.on_mouse_drag_event
    -
    dt_tick(dt: float) -> None
    +
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Update the sprite's delta time.

    +

    Handle a mouse drag event.

    @@ -20672,11 +6419,19 @@
    • - dt - (float) + event + (Event) –
      -

      The new delta time.

      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

    @@ -20717,18 +6472,51 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.update +
    + glitchygames.sprites.Sprite.on_mouse_drop_event
    -
    update() -> None
    +
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Update the sprite.

    +

    Handle a mouse drop event.

    + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    @@ -20762,17 +6550,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_joy_axis_motion_event +
    + glitchygames.sprites.Sprite.on_mouse_wheel_event
    -
    on_joy_axis_motion_event(event: Event) -> None
    +
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a joystick axis motion event.

    +

    Handle a mouse wheel event.

    @@ -20794,6 +6582,14 @@
    +

    The object that triggered the event.

    +
    + @@ -20832,437 +6628,344 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_joy_button_down_event +
    + glitchygames.sprites.Sprite.__str__
    -
    on_joy_button_down_event(event: Event) -> None
    +
    __str__() -> str
     
    -

    Handle a joystick button down event.

    +

    Returns a string representation of the sprite.

    +
    +
    + + + +
    + + + + + + +
    + + + +

    + glitchygames.sprites.BitmappySprite + + +

    + + +
    +

    + Bases: Sprite

    + + +

    A sprite that loads from a Bitmappy config file.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.sprites.BitmappySprite.DEBUG + + + + class-attribute + instance-attribute + + +
    +
    DEBUG = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.sprites.BitmappySprite.DEFAULT_SURFACE_W + + + + class-attribute + instance-attribute + + +
    +
    DEFAULT_SURFACE_W = 42
    +
    + +
    +
    + +
    + +
    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.sprites.BitmappySprite.DEFAULT_SURFACE_H + + + + class-attribute + instance-attribute + + +
    +
    DEFAULT_SURFACE_H = 42
    +
    + +
    - -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_joy_button_up_event +
    + glitchygames.sprites.BitmappySprite.DEFAULT_SURFACE + + + class-attribute + instance-attribute +
    -
    on_joy_button_up_event(event: Event) -> None
    +
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
     
    - -

    Handle a joystick button up event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.sprites.BitmappySprite.filename + + + + instance-attribute + + +
    +
    filename = filename
    +
    + +
    - -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_joy_hat_motion_event +
    + glitchygames.sprites.BitmappySprite.focusable + + + instance-attribute +
    -
    on_joy_hat_motion_event(event: Event) -> None
    +
    focusable = focusable
     
    - -

    Handle a joystick hat motion event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.sprites.BitmappySprite.width + + + + instance-attribute + + +
    +
    width = width
    +
    + +
    - -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_joy_ball_motion_event +
    + glitchygames.sprites.BitmappySprite.height + + + instance-attribute +
    -
    on_joy_ball_motion_event(event: Event) -> None
    +
    height = height
     
    - -

    Handle a joystick ball motion event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.sprites.BitmappySprite.image + + + + instance-attribute + + +
    +
    image = Surface((width, height))
    +
    + +
    - -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_enter_event +
    + glitchygames.sprites.BitmappySprite.rect + + + instance-attribute +
    -
    on_mouse_enter_event(event: Event) -> None
    +
    rect = get_rect()
     
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    - -
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_exit_event +
    + glitchygames.sprites.BitmappySprite.parent + + + instance-attribute +
    -
    on_mouse_exit_event(event: Event) -> None
    +
    parent = parent
     
    - -

    Handle a mouse exit event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.sprites.BitmappySprite.proxies + + + + instance-attribute + + +
    +
    proxies = [parent]
    +
    + +
    +
    Functions
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_drag_down_event +
    + glitchygames.sprites.BitmappySprite.__init__
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    filename: str | None = None,
    +    focusable: bool = False,
    +    parent: object = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a mouse drag down event.

    +

    Subclass to load sprite files.

    @@ -21277,97 +6980,85 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      the x coordinate of the sprite.

    • - trigger - (object | None) + y + (int) –
      -

      The object that triggered the event.

      +

      the y coordinate of the sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      the width of the sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      the height of the sprite.

      +
      +
    • +
    • + name + (str | None, default: + None +) + – +
      +

      optional, the name of the sprite.

    • -
    - - - - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
    • - event - (Event) + filename + (str | None, default: + None +) –
      -

      The event to handle.

      +

      optional, the BitmappySprite config to load.

    • - trigger - (object | None) + focusable + (bool, default: + False +) –
      -

      The object that triggered the event.

      +

      optional, whether or not the sprite can receive focus.

      +
      +
    • +
    • + parent + (object, default: + None +) + – +
      +

      optional, the parent of the sprite.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      optional, the sprite groups to add the sprite to.

    @@ -21408,17 +7099,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_left_mouse_drag_up_event +
    + glitchygames.sprites.BitmappySprite.load
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    load(filename: str) -> tuple[Surface, Rect, str]
     
    -

    Handle a left mouse drag up event.

    +

    Load a sprite from a Bitmappy config file.

    @@ -21433,19 +7124,11 @@
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) + filename + (str) –
      -

      The object that triggered the event.

      +

      the filename of the Bitmappy config file.

    @@ -21466,10 +7149,10 @@
    • - None + tuple[Surface, Rect, str]
      -

      None

      +

      A tuple containing the sprite's image, rect, and name.

    @@ -21477,27 +7160,6 @@
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - @@ -21507,23 +7169,21 @@
    - + - - - - - - - - - -
    Parameters:Raises:
    • - event - (Event) + NoSectionError
      -

      The event to handle.

      +

      if the config file is missing a section.

    • - trigger - (object | None) + NoOptionError
      -

      The object that triggered the event.

      +

      if the config file is missing an option.

    @@ -21531,30 +7191,6 @@
    -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    @@ -21564,17 +7200,21 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_middle_mouse_drag_up_event +
    + glitchygames.sprites.BitmappySprite.inflate + + + classmethod +
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
     
    -

    Handle a middle mouse drag up event.

    +

    Inflate a sprite from a list of pixels.

    @@ -21589,19 +7229,35 @@
    • - event - (Event) + width + (int) –
      -

      The event to handle.

      +

      the width of the sprite.

    • - trigger - (object | None) + height + (int) –
      -

      The object that triggered the event.

      +

      the height of the sprite.

      +
      +
    • +
    • + pixels + (list) + – +
      +

      the list of pixels.

      +
      +
    • +
    • + color_map + (dict) + – +
      +

      the color map.

    @@ -21622,58 +7278,10 @@
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - -
    Returns: -
      -
    • - None + tuple[Surface, Rect]
      -

      None

      +

      A tuple containing the sprite's image and rect.

    @@ -21690,17 +7298,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_right_mouse_drag_up_event +
    + glitchygames.sprites.BitmappySprite.save
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    save(filename: str) -> None
     
    -

    Handle a right mouse drag up event.

    +

    Save a sprite to a Bitmappy config file.

    @@ -21715,19 +7323,11 @@
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) + filename + (str) –
      -

      The object that triggered the event.

      +

      the filename of the Bitmappy config file.

    @@ -21768,43 +7368,18 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_drag_up_event +
    + glitchygames.sprites.BitmappySprite.deflate
    -
    on_mouse_drag_up_event(event: Event) -> None
    +
    deflate() -> dict
     
    -

    Handle a mouse drag up event.

    - - +

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -21818,10 +7393,10 @@
    • - None + dict
      -

      None

      +

      A dict containing the sprite's config.

    @@ -21838,17 +7413,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_chord_up_event +
    + glitchygames.sprites.BitmappySprite.on_left_mouse_drag_event
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    +
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse chord up event.

    +

    Handle a left mouse drag event.

    @@ -21871,11 +7446,11 @@
    -

    The keys that were pressed.

    +

    The object that triggered the event.

    @@ -21916,17 +7491,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_mouse_chord_down_event +
    + glitchygames.sprites.BitmappySprite.on_middle_mouse_drag_event
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    +
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse chord down event.

    +

    Handle a middle mouse drag event.

    @@ -21949,11 +7524,11 @@
    -

    The keys that were pressed.

    +

    The object that triggered the event.

    @@ -21994,17 +7569,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_key_down_event +
    + glitchygames.sprites.BitmappySprite.on_right_mouse_drag_event
    -
    on_key_down_event(event: Event) -> None
    +
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a key down event.

    +

    Handle a right mouse drag event.

    @@ -22026,6 +7601,14 @@
    The event to handle.

    +
  • + trigger + (object | None) + – +
    +

    The object that triggered the event.

    +
    +
  • @@ -22064,17 +7647,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_key_up_event +
    + glitchygames.sprites.BitmappySprite.on_left_mouse_drop_event
    -
    on_key_up_event(event: Event) -> None
    +
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a key up event.

    +

    Handle a left mouse drop event.

    @@ -22096,6 +7679,14 @@
    The event to handle.

    +
  • + trigger + (object | None) + – +
    +

    The object that triggered the event.

    +
    +
  • @@ -22134,17 +7725,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_key_chord_down_event +
    + glitchygames.sprites.BitmappySprite.on_middle_mouse_drop_event
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    +
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a key chord down event.

    +

    Handle a middle mouse drop event.

    @@ -22167,11 +7758,11 @@
    -

    The keys that were pressed.

    +

    The object that triggered the event.

    @@ -22212,17 +7803,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_key_chord_up_event +
    + glitchygames.sprites.BitmappySprite.on_right_mouse_drop_event
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    +
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a key chord up event.

    +

    Handle a right mouse drop event.

    @@ -22245,11 +7836,11 @@
    -

    The keys that were pressed.

    +

    The object that triggered the event.

    @@ -22290,17 +7881,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_quit_event +
    + glitchygames.sprites.BitmappySprite.on_mouse_drag_event
    -
    on_quit_event(event: Event) -> None
    +
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a quit event.

    +

    Handle a mouse drag event.

    @@ -22322,6 +7913,14 @@
    The event to handle.

    +
  • + trigger + (object | None) + – +
    +

    The object that triggered the event.

    +
    +
  • @@ -22360,17 +7959,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_active_event +
    + glitchygames.sprites.BitmappySprite.on_mouse_drop_event
    -
    on_active_event(event: Event) -> None
    +
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle an active event.

    +

    Handle a mouse drop event.

    @@ -22392,6 +7991,14 @@
    The event to handle.

    +
  • + trigger + (object | None) + – +
    +

    The object that triggered the event.

    +
    +
  • @@ -22430,17 +8037,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_video_resize_event +
    + glitchygames.sprites.BitmappySprite.on_mouse_wheel_event
    -
    on_video_resize_event(event: Event) -> None
    +
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a video resize event.

    +

    Handle a mouse wheel event.

    @@ -22462,6 +8069,14 @@
    +

    The object that triggered the event.

    +
    + @@ -22500,17 +8115,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_video_expose_event +
    + glitchygames.sprites.BitmappySprite.on_mouse_chord_down_event
    -
    on_video_expose_event(event: Event) -> None
    +
    on_mouse_chord_down_event(event: Event, keys: list) -> None
     
    -

    Handle a video expose event.

    +

    Handle a mouse chord down event.

    @@ -22532,6 +8147,14 @@
    +

    The keys that were pressed.

    +
    + @@ -22570,17 +8193,17 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_sys_wm_event +
    + glitchygames.sprites.BitmappySprite.on_mouse_chord_up_event
    -
    on_sys_wm_event(event: Event) -> None
    +
    on_mouse_chord_up_event(event: Event, keys: list) -> None
     
    -

    Handle a sys wm event.

    +

    Handle a mouse chord up event.

    @@ -22602,6 +8225,14 @@
    The event to handle.

    +
  • + keys + (list) + – +
    +

    The keys that were pressed.

    +
    +
  • @@ -22636,21 +8267,81 @@
    + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.sprites.Singleton + + +

    + + +
    + + +

    A generic singleton class.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.sprites.Singleton.__instance__ + + + + class-attribute + instance-attribute + + +
    +
    __instance__ = None
    +
    + +
    +
    + +
    + +
    Functions
    + +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.on_user_event +
    + glitchygames.sprites.Singleton.__new__
    -
    on_user_event(event: Event) -> None
    +
    __new__(*args, **kwargs) -> Self
     
    -

    Handle a user event.

    +

    Create a new instance of the Singleton.

    @@ -22665,11 +8356,17 @@
    • - event - (Event) + *args
      -

      The event to handle.

      +

      The arguments to pass to the constructor.

      +
      +
    • +
    • + **kwargs + – +
      +

      The keyword arguments to pass to the constructor.

    @@ -22690,10 +8387,10 @@
    • - None - – +Singleton( Self +) –
      -

      None

      +

      The instance of the Singleton.

    @@ -22703,45 +8400,86 @@
    -
    +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.sprites.SingletonBitmappySprite + + +

    + + +
    +

    + Bases: BitmappySprite

    + + +

    A singleton class for handling singleton sprites, like mouse pointers.

    -
    + + +
    + + + + + +
    Attributes
    + +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.__str__ +
    + glitchygames.sprites.SingletonBitmappySprite.__instance__ + + + class-attribute + instance-attribute +
    -
    __str__() -> str
    +
    __instance__ = None
     
    - -

    Returns a string representation of the sprite.

    -
    +
    Functions
    +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.load +
    + glitchygames.sprites.SingletonBitmappySprite.__new__
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    +
    __new__(*args, **kwargs) -> Self
     
    -

    Load a sprite from a Bitmappy config file.

    +

    Create a new instance of the SingletonBitmappySprite.

    @@ -22756,11 +8494,17 @@
    • - filename - (str) + *args
      -

      the filename of the Bitmappy config file.

      +

      The arguments to pass to the constructor.

      +
      +
    • +
    • + **kwargs + – +
      +

      The keyword arguments to pass to the constructor.

    @@ -22781,10 +8525,10 @@
    • - tuple[Surface, Rect, str] - – +SingletonBitmappySprite( Self +) –
      -

      A tuple containing the sprite's image, rect, and name.

      +

      The instance of the SingletonBitmappySprite.

    @@ -22792,37 +8536,6 @@
    -
    - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    @@ -22832,21 +8545,24 @@
    - glitchygames.sprites.FocusableSingletonBitmappySprite.inflate +
    + glitchygames.sprites.SingletonBitmappySprite.__init__ - - - classmethod -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Inflate a sprite from a list of pixels.

    +

    Initialize the SingletonBitmappySprite.

    @@ -22860,12 +8576,28 @@
    Parameters:
      +
    • + x + (int) + – +
      +

      The x coordinate of the sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the sprite.

      +
      +
    • width (int) –
      -

      the width of the sprite.

      +

      The width of the sprite.

    • @@ -22873,23 +8605,27 @@
      -

      the height of the sprite.

      +

      The height of the sprite.

    • - pixels - (list) + name + (str, default: + None +) –
      -

      the list of pixels.

      +

      The name of the sprite.

    • - color_map - (dict) + groups + (LayeredDirty, default: + None +) –
      -

      the color map.

      +

      The sprite groups to add the sprite to.

    @@ -22910,10 +8646,10 @@
    • - tuple[Surface, Rect] + None
      -

      A tuple containing the sprite's image and rect.

      +

      None

    @@ -22926,120 +8662,67 @@
    + + -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.save + + +
    + + + +

    + glitchygames.sprites.FocusableSingletonBitmappySprite + + +

    -
    -
    save(filename: str) -> None
    -
    +

    + Bases: BitmappySprite

    + -

    Save a sprite to a Bitmappy config file.

    +

    A singleton class for handling all of the focusable sprite behaviors.

    + - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    -
    -
    +
    Attributes
    + +
    -
    - glitchygames.sprites.FocusableSingletonBitmappySprite.deflate +
    + glitchygames.sprites.FocusableSingletonBitmappySprite.__instance__ + + + class-attribute + instance-attribute +
    -
    deflate() -> dict
    +
    __instance__ = None
     
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    +
    Functions
    +
    diff --git a/reference/glitchygames/ui/index.html b/reference/glitchygames/ui/index.html index d1949cc..8854867 100644 --- a/reference/glitchygames/ui/index.html +++ b/reference/glitchygames/ui/index.html @@ -454,49 +454,6 @@
    Attributes
    -
    - glitchygames.ui.GameEngine.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.GameEngine.proxies - - - - instance-attribute - - -
    -
    proxies = [EventProxy(event_source=self)]
    -
    - -
    -
    - -
    - -
    - - -
    glitchygames.ui.GameEngine.log @@ -1017,117 +974,206 @@
    -
    Classes
    -
    +
    Functions
    +
    -
    - glitchygames.ui.GameEngine.EventProxy -
    +
    + glitchygames.ui.GameEngine.__init__ -
    +
    +
    __init__(game: object, icon: Surface | Path | str = None) -> None
    +
    +
    -

    Proxy for events.

    +

    Initialize the game engine.

    - - -
    + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object) + – +
      +

      The game instance.

      +
      +
    • +
    • + icon + (Surface | Path | str, default: + None +) + – +
      +

      The game icon.

      +
      +
    • +
    +
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    +
    -Attributes -
    +
    - - glitchygames.ui.GameEngine.EventProxy.log +
    + glitchygames.ui.GameEngine.initialize_display - - - class-attribute - instance-attribute - - -
    log: Logger = LOG
    +
    +
    initialize_display() -> None
     
    -
    - -
    - -
    - - - - - glitchygames.ui.GameEngine.EventProxy.proxies - - - instance-attribute - +

    Initialize the display.

    -
    -
    proxies = []
    -
    -
    + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    - - glitchygames.ui.GameEngine.EventProxy.event_source - - - instance-attribute - +
    + glitchygames.ui.GameEngine.initialize_event_handlers - -
    event_source = event_source
    +
    +
    +
    initialize_event_handlers() -> None
     
    + +

    Initialize event handlers.

    +

    The engine calls this on your behalf.

    +

    Event subsystem bootstrapping

    +

    This gives us much faster event processing than +doing a lookup every time an event comes in since +we can just call the processing function directly.

    +

    It's not as fast as a raw pygame event loop, +but since we layer richer event types on top of +the pygame raw events, this gives us a nice balance +of extensibility with performance.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -Functions -
    - - glitchygames.ui.GameEngine.EventProxy.__init__ +
    + glitchygames.ui.GameEngine.initialize_input_event_handlers - -
    __init__(event_source: object) -> None
    +
    +
    initialize_input_event_handlers() -> None
     
    -

    Initialize the event proxy.

    +

    Initialize input event handlers.

    +

    The engine calls this on your behalf.

    +

    This initializes the input event handlers.

    @@ -1138,559 +1184,42 @@
    - Parameters: - -
      -
    • - event_source - (object) - – -
      -

      The event source.

      -
      -
    • -
    - + Returns: + +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    + - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.GameEngine.EventProxy.unhandled_event - - - -
    unhandled_event(*args, **kwargs) -> None
    -
    - -
    - -

    Handle unhandled events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.GameEngine.EventProxy.__getattr__ - - - -
    __getattr__(attr: str) -> Callable
    -
    - -
    - -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - Callable - – -
      -

      The attribute.

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    -
    Functions
    - - -
    - - - -
    - glitchygames.ui.GameEngine.__new__ - - -
    -
    __new__(*args, **kwargs) -> object
    -
    - -
    - -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - object - – -
      -

      The new instance of the class.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.GameEngine.__init__ - - -
    -
    __init__(game: object, icon: Surface | Path | str = None) -> None
    -
    - -
    - -

    Initialize the game engine.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - game - (object) - – -
      -

      The game instance.

      -
      -
    • -
    • - icon - (Surface | Path | str, default: - None -) - – -
      -

      The game icon.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.GameEngine.initialize_display - - -
    -
    initialize_display() -> None
    -
    - -
    - -

    Initialize the display.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.GameEngine.initialize_event_handlers - - -
    -
    initialize_event_handlers() -> None
    -
    - -
    - -

    Initialize event handlers.

    -

    The engine calls this on your behalf.

    -

    Event subsystem bootstrapping

    -

    This gives us much faster event processing than -doing a lookup every time an event comes in since -we can just call the processing function directly.

    -

    It's not as fast as a raw pygame event loop, -but since we layer richer event types on top of -the pygame raw events, this gives us a nice balance -of extensibility with performance.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.GameEngine.initialize_input_event_handlers - - -
    -
    initialize_input_event_handlers() -> None
    -
    - -
    - -

    Initialize input event handlers.

    -

    The engine calls this on your behalf.

    -

    This initializes the input event handlers.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.GameEngine.__del__ - - -
    -
    __del__() -> None
    -
    - -
    - -

    Delete the game engine.

    - +
    + +
    + + +
    + + + +
    + glitchygames.ui.GameEngine.__del__ + + +
    +
    __del__() -> None
    +
    + +
    + +

    Delete the game engine.

    + @@ -3885,71 +3414,6 @@
    Attributes
    -
    - glitchygames.ui.FontManager.log - - - - class-attribute - instance-attribute - - -
    -
    log: Logger = LOG
    -
    - -
    -
    - - - -
    - - - -
    - glitchygames.ui.FontManager.__instances__ - - - - class-attribute - instance-attribute - - -
    -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FontManager.proxies - - - - instance-attribute - - -
    -
    proxies = []
    -
    - -
    -
    - -
    - -
    - - -
    glitchygames.ui.FontManager.OPTIONS @@ -4024,50 +3488,6 @@
    - - glitchygames.ui.FontManager.FontProxy.log - - - - class-attribute - instance-attribute - - - -
    log: Logger = LOG
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.FontManager.FontProxy.__instances__ - - - - class-attribute - instance-attribute - - - -
    __instances__: ClassVar = {}
    -
    - -
    -
    - -
    - -
    - - - glitchygames.ui.FontManager.FontProxy.game @@ -4113,18 +3533,17 @@
    - - glitchygames.ui.FontManager.FontProxy.__new__ + + glitchygames.ui.FontManager.FontProxy.__init__ -
    __new__(*args, **kwargs) -> object
    +
    __init__(game: object = None) -> None
     
    -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    Initialize the font proxy.

    @@ -4139,25 +3558,13 @@
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs + game + (object, default: + None +) –
      -

      The keyword arguments.

      +

      The game object.

    @@ -4178,10 +3585,10 @@
    • - object + None
      -

      The new instance of the class.

      +

      None

    @@ -4189,51 +3596,36 @@
    +
    +
    + + + +
    - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    +
    +
    Functions
    - - glitchygames.ui.FontManager.FontProxy.__getattr__ +
    + glitchygames.ui.FontManager.__init__ - -
    __getattr__(attr: str) -> Callable
    +
    +
    __init__(game: object = None) -> None
     
    -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +

    Initialize the font manager.

    @@ -4248,11 +3640,13 @@
    • - attr - (str) + game + (object, default: + None +) –
      -

      The attribute to get.

      +

      The game object.

    @@ -4273,10 +3667,10 @@
    • - Callable + None
      -

      The attribute.

      +

      None

    @@ -4284,30 +3678,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    @@ -4317,46 +3687,21 @@
    - - glitchygames.ui.FontManager.FontProxy.__subclasshook__ +
    + glitchygames.ui.FontManager.args classmethod - -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - - - glitchygames.ui.FontManager.FontProxy.on_font_changed_event - - - - abstractmethod - - - -
    on_font_changed_event(event: Event) -> None
    +
    +
    args(parser: ArgumentParser) -> ArgumentParser
     
    -

    Handle font changed events.

    +

    Add font options to the argument parser.

    @@ -4371,11 +3716,11 @@
    • - event - (Event) + parser + (ArgumentParser) –
      -

      The event to handle.

      +

      The argument parser.

    @@ -4396,10 +3741,10 @@
    • - None + ArgumentParser
      -

      None

      +

      argparse.ArgumentParser

    @@ -4416,17 +3761,26 @@
    - - glitchygames.ui.FontManager.FontProxy.__init__ +
    + glitchygames.ui.FontManager.font + + + classmethod + - -
    __init__(game: object = None) -> None
    +
    +
    font(font_config: dict | None = None) -> Font | SysFont
     
    -

    Initialize the font proxy.

    +

    Return a font object.

    +

    If the font requested can't be found then bitstream_vera will be loaded instead.

    +

    Note that if you are trying to package your game with pyinstaller, you'll need to bundle +your game's fonts with the pyinstaller invocation. Make sure you have distribution +rights to the fonts you're including with your game.

    +

    bitstream_vera is a permissively licensed font that can be used with your game.

    @@ -4441,13 +3795,13 @@
    • - game - (object, default: + font_config + (dict | None, default: None ) –
      -

      The game object.

      +

      The font configuration.

    @@ -4468,10 +3822,10 @@
    • - None + Font | SysFont
      -

      None

      +

      pygame.freetype.Font | pygame.freetype.SysFont

    @@ -4491,492 +3845,138 @@
    -
    Functions
    +
    -
    +

    + glitchygames.ui.BitmappySprite -

    - glitchygames.ui.FontManager.__new__ +
    -
    -
    __new__(*args, **kwargs) -> object
    -
    - -

    Create a new instance of the class.

    -

    This method is called when a new instance of the class

    +

    + Bases: Sprite

    + +

    A sprite that loads from a Bitmappy config file.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - cls - (Self) - – -
      -

      The class.

      -
      -
    • -
    • - *args - – -
      -

      The positional arguments.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments.

      -
      -
    • -
    -
    + +
    - - - - - - - - - - - -
    Returns: -
      -
    • - object - – -
      -

      The new instance of the class.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the event is not handled by any proxy.

      -
      -
    • -
    -
    -
    -
    +
    Attributes
    -
    +
    -
    - glitchygames.ui.FontManager.__getattr__ +
    + glitchygames.ui.BitmappySprite.DEBUG + + + class-attribute + instance-attribute +
    -
    __getattr__(attr: str) -> Callable
    +
    DEBUG = False
     
    - -

    Get an attribute.

    -

    This method is called when an attribute is not found.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - attr - (str) - – -
      -

      The attribute to get.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - Callable - – -
      -

      The attribute.

      -
      -
    • -
    -
    +
    + glitchygames.ui.BitmappySprite.DEFAULT_SURFACE_W + + + class-attribute + instance-attribute + - - - - - - - - - - - -
    Raises: -
      -
    • - AttributeError - – -
      -

      If the attribute is not found.

      -
      -
    • -
    -
    +
    +
    DEFAULT_SURFACE_W = 42
    +
    + +
    - -
    +
    -
    - glitchygames.ui.FontManager.__init__ +
    + glitchygames.ui.BitmappySprite.DEFAULT_SURFACE_H + + + class-attribute + instance-attribute +
    -
    __init__(game: object = None) -> None
    +
    DEFAULT_SURFACE_H = 42
     
    - -

    Initialize the font manager.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - game - (object, default: - None -) - – -
      -

      The game object.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    - -
    +
    -
    - glitchygames.ui.FontManager.args +
    + glitchygames.ui.BitmappySprite.DEFAULT_SURFACE - classmethod + class-attribute + instance-attribute
    -
    args(parser: ArgumentParser) -> ArgumentParser
    +
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
     
    - -

    Add font options to the argument parser.

    +
    +
    - - - - - - - - - - - - -
    Parameters: -
      -
    • - parser - (ArgumentParser) - – -
      -

      The argument parser.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - ArgumentParser - – -
      -

      argparse.ArgumentParser

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FontManager.font - - - - classmethod - - -
    -
    font(font_config: dict | None = None) -> Font | SysFont
    -
    - -
    - -

    Return a font object.

    -

    If the font requested can't be found then bitstream_vera will be loaded instead.

    -

    Note that if you are trying to package your game with pyinstaller, you'll need to bundle -your game's fonts with the pyinstaller invocation. Make sure you have distribution -rights to the fonts you're including with your game.

    -

    bitstream_vera is a permissively licensed font that can be used with your game.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - font_config - (dict | None, default: - None -) - – -
      -

      The font configuration.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - Font | SysFont - – -
      -

      pygame.freetype.Font | pygame.freetype.SysFont

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.BitmappySprite - - -

    - - -
    -

    - Bases: Sprite

    - - -

    A sprite that loads from a Bitmappy config file.

    - - - - -
    - - - - - -
    Attributes
    - -
    +
    -
    - glitchygames.ui.BitmappySprite.log +
    + glitchygames.ui.BitmappySprite.filename - class-attribute instance-attribute
    -
    log = LOG
    +
    filename = filename
     
    @@ -4988,17 +3988,16 @@
    -
    - glitchygames.ui.BitmappySprite.USE_GFXDRAW +
    + glitchygames.ui.BitmappySprite.focusable - class-attribute instance-attribute
    -
    USE_GFXDRAW: ClassVar = False
    +
    focusable = focusable
     
    @@ -5010,17 +4009,16 @@
    -
    - glitchygames.ui.BitmappySprite.PROXIES +
    + glitchygames.ui.BitmappySprite.width - class-attribute instance-attribute
    -
    PROXIES: ClassVar = [sprite]
    +
    width = width
     
    @@ -5032,17 +4030,16 @@
    -
    - glitchygames.ui.BitmappySprite.SPRITE_BREAKPOINTS +
    + glitchygames.ui.BitmappySprite.height - class-attribute instance-attribute
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    +
    height = height
     
    @@ -5054,17 +4051,16 @@
    - glitchygames.ui.BitmappySprite.SPRITE_COUNTERS +
    + glitchygames.ui.BitmappySprite.image - class-attribute instance-attribute
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    +
    image = Surface((width, height))
     
    @@ -5076,17 +4072,16 @@
    -
    - glitchygames.ui.BitmappySprite.SPRITE_COUNT +
    + glitchygames.ui.BitmappySprite.rect - class-attribute instance-attribute
    -
    SPRITE_COUNT = 0
    +
    rect = get_rect()
     
    @@ -5098,8 +4093,8 @@
    -
    - glitchygames.ui.BitmappySprite.dt +
    + glitchygames.ui.BitmappySprite.parent @@ -5107,7 +4102,7 @@
    -
    dt = 0
    +
    parent = parent
     
    @@ -5119,8 +4114,8 @@
    -
    - glitchygames.ui.BitmappySprite.dt_timer +
    + glitchygames.ui.BitmappySprite.proxies @@ -5128,7 +4123,7 @@
    -
    dt_timer = 0
    +
    proxies = [parent]
     
    @@ -5136,390 +4131,472 @@
    -
    - - - -
    - glitchygames.ui.BitmappySprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    +
    Functions
    -
    -
    +
    -
    - glitchygames.ui.BitmappySprite.callbacks +
    + glitchygames.ui.BitmappySprite.__init__ - - - instance-attribute -
    -
    callbacks = {}
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    filename: str | None = None,
    +    focusable: bool = False,
    +    parent: object = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -
    - -
    - -
    - + +

    Subclass to load sprite files.

    -
    - glitchygames.ui.BitmappySprite.screen - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + x + (int) + – +
      +

      the x coordinate of the sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      the y coordinate of the sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      the width of the sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      the height of the sprite.

      +
      +
    • +
    • + name + (str | None, default: + None +) + – +
      +

      optional, the name of the sprite.

      +
      +
    • +
    • + filename + (str | None, default: + None +) + – +
      +

      optional, the BitmappySprite config to load.

      +
      +
    • +
    • + focusable + (bool, default: + False +) + – +
      +

      optional, whether or not the sprite can receive focus.

      +
      +
    • +
    • + parent + (object, default: + None +) + – +
      +

      optional, the parent of the sprite.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      optional, the sprite groups to add the sprite to.

      +
      +
    • +
    +
    -
    -
    screen = get_surface()
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    +
    -
    - glitchygames.ui.BitmappySprite.screen_width - - - instance-attribute - +
    + glitchygames.ui.BitmappySprite.load +
    -
    screen_width = get_width()
    +
    load(filename: str) -> tuple[Surface, Rect, str]
     
    -
    - -
    + +

    Load a sprite from a Bitmappy config file.

    -
    + + + + + + + + + + + +
    Parameters: +
      +
    • + filename + (str) + – +
      +

      the filename of the Bitmappy config file.

      +
      +
    • +
    +
    -
    - glitchygames.ui.BitmappySprite.screen_height - - - instance-attribute - + + + + + + + + + + + +
    Returns: +
      +
    • + tuple[Surface, Rect, str] + – +
      +

      A tuple containing the sprite's image, rect, and name.

      +
      +
    • +
    +
    -
    -
    screen_height = get_height()
    -
    -
    + + + + + + + + + + + +
    Raises: +
      +
    • + NoSectionError + – +
      +

      if the config file is missing a section.

      +
      +
    • +
    • + NoOptionError + – +
      +

      if the config file is missing an option.

      +
      +
    • +
    +
    -
    + +
    -
    - glitchygames.ui.BitmappySprite.DEBUG +
    + glitchygames.ui.BitmappySprite.inflate - class-attribute - instance-attribute + classmethod
    -
    DEBUG = False
    +
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
     
    -
    - -
    - -
    - - + +

    Inflate a sprite from a list of pixels.

    -
    - glitchygames.ui.BitmappySprite.DEFAULT_SURFACE_W - - - class-attribute - instance-attribute - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.BitmappySprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.BitmappySprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.BitmappySprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.BitmappySprite.focusable - - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + width + (int) + – +
      +

      the width of the sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      the height of the sprite.

      +
      +
    • +
    • + pixels + (list) + – +
      +

      the list of pixels.

      +
      +
    • +
    • + color_map + (dict) + – +
      +

      the color map.

      +
      +
    • +
    +
    -
    -
    focusable = focusable
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + tuple[Surface, Rect] + – +
      +

      A tuple containing the sprite's image and rect.

      +
      +
    • +
    +
    -
    - - - -
    - glitchygames.ui.BitmappySprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    -
    -
    - -
    - -
    +
    -
    - glitchygames.ui.BitmappySprite.height +
    + glitchygames.ui.BitmappySprite.save - - - instance-attribute -
    -
    height = height
    +
    save(filename: str) -> None
     
    -
    - -
    - -
    - - - -
    - glitchygames.ui.BitmappySprite.image - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - +

    Save a sprite to a Bitmappy config file.

    -
    - glitchygames.ui.BitmappySprite.rect - - - instance-attribute - + + + + + + + + + + + +
    Parameters: +
      +
    • + filename + (str) + – +
      +

      the filename of the Bitmappy config file.

      +
      +
    • +
    +
    -
    -
    rect = get_rect()
    -
    -
    + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    -
    - - - -
    - glitchygames.ui.BitmappySprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    -
    +
    -
    - glitchygames.ui.BitmappySprite.proxies +
    + glitchygames.ui.BitmappySprite.deflate - - - instance-attribute -
    -
    proxies = [parent]
    +
    deflate() -> dict
     
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.BitmappySprite.__subclasshook__ - - - classmethod - +

    Deflate a sprite to a Bitmappy config file.

    -
    -
    __subclasshook__(subclass: object) -> bool
    -
    -
    - -

    Override the default subclasshook to create an interface.

    + + + + + + + + + + + +
    Returns: +
      +
    • + dict + – +
      +

      A dict containing the sprite's config.

      +
      +
    • +
    +
    @@ -5529,17 +4606,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_motion_event +
    + glitchygames.ui.BitmappySprite.on_left_mouse_drag_event
    -
    on_mouse_motion_event(event: Event) -> None
    +
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse motion event.

    +

    Handle a left mouse drag event.

    @@ -5561,6 +4638,14 @@
    +

    The object that triggered the event.

    +
    + @@ -5599,17 +4684,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_focus_event +
    + glitchygames.ui.BitmappySprite.on_middle_mouse_drag_event
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    +
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse focus event.

    +

    Handle a middle mouse drag event.

    @@ -5632,11 +4717,11 @@
    -

    The old focus.

    +

    The object that triggered the event.

    @@ -5677,17 +4762,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_unfocus_event +
    + glitchygames.ui.BitmappySprite.on_right_mouse_drag_event
    -
    on_mouse_unfocus_event(event: Event) -> None
    +
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse unfocus event.

    +

    Handle a right mouse drag event.

    @@ -5709,6 +4794,14 @@
    +

    The object that triggered the event.

    +
    + @@ -5747,17 +4840,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_button_up_event +
    + glitchygames.ui.BitmappySprite.on_left_mouse_drop_event
    -
    on_mouse_button_up_event(event: Event) -> None
    +
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse button up event.

    +

    Handle a left mouse drop event.

    @@ -5779,6 +4872,14 @@
    +

    The object that triggered the event.

    +
    + @@ -5817,17 +4918,17 @@
    - glitchygames.ui.BitmappySprite.on_left_mouse_button_up_event +
    + glitchygames.ui.BitmappySprite.on_middle_mouse_drop_event
    -
    on_left_mouse_button_up_event(event: Event) -> None
    +
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a left mouse button up event.

    +

    Handle a middle mouse drop event.

    @@ -5849,6 +4950,14 @@
    +

    The object that triggered the event.

    +
    + @@ -5887,17 +4996,17 @@
    - glitchygames.ui.BitmappySprite.on_middle_mouse_button_up_event +
    + glitchygames.ui.BitmappySprite.on_right_mouse_drop_event
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a middle mouse button up event.

    +

    Handle a right mouse drop event.

    @@ -5919,6 +5028,14 @@
    +

    The object that triggered the event.

    +
    + @@ -5957,17 +5074,17 @@
    - glitchygames.ui.BitmappySprite.on_right_mouse_button_up_event +
    + glitchygames.ui.BitmappySprite.on_mouse_drag_event
    -
    on_right_mouse_button_up_event(event: Event) -> None
    +
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a right mouse button up event.

    +

    Handle a mouse drag event.

    @@ -5989,6 +5106,14 @@
    +

    The object that triggered the event.

    +
    + @@ -6027,17 +5152,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_button_down_event +
    + glitchygames.ui.BitmappySprite.on_mouse_drop_event
    -
    on_mouse_button_down_event(event: Event) -> None
    +
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse button down event.

    +

    Handle a mouse drop event.

    @@ -6059,6 +5184,14 @@
    +

    The object that triggered the event.

    +
    + @@ -6097,17 +5230,17 @@
    - glitchygames.ui.BitmappySprite.on_left_mouse_button_down_event +
    + glitchygames.ui.BitmappySprite.on_mouse_wheel_event
    -
    on_left_mouse_button_down_event(event: Event) -> None
    +
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a left mouse button down event.

    +

    Handle a mouse wheel event.

    @@ -6129,6 +5262,14 @@
    +

    The object that triggered the event.

    +
    + @@ -6167,17 +5308,17 @@
    - glitchygames.ui.BitmappySprite.on_middle_mouse_button_down_event +
    + glitchygames.ui.BitmappySprite.on_mouse_chord_down_event
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    on_mouse_chord_down_event(event: Event, keys: list) -> None
     
    -

    Handle a middle mouse button down event.

    +

    Handle a mouse chord down event.

    @@ -6199,6 +5340,14 @@
    The event to handle.

    +
  • + keys + (list) + – +
    +

    The keys that were pressed.

    +
    +
  • @@ -6237,17 +5386,17 @@
    - glitchygames.ui.BitmappySprite.on_right_mouse_button_down_event +
    + glitchygames.ui.BitmappySprite.on_mouse_chord_up_event
    -
    on_right_mouse_button_down_event(event: Event) -> None
    +
    on_mouse_chord_up_event(event: Event, keys: list) -> None
     
    -

    Handle a right mouse button down event.

    +

    Handle a mouse chord up event.

    @@ -6269,6 +5418,14 @@
    +

    The keys that were pressed.

    +
    + @@ -6303,165 +5460,83 @@
    +
    +
    -
    - glitchygames.ui.BitmappySprite.on_mouse_scroll_down_event +
    -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    +
    -
    - -

    Handle a mouse scroll down event.

    +

    + glitchygames.ui.FocusableSingletonBitmappySprite - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +

    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    -
    +
    +

    + Bases: BitmappySprite

    + +

    A singleton class for handling all of the focusable sprite behaviors.

    -
    + +
    -
    - glitchygames.ui.BitmappySprite.on_mouse_scroll_up_event -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    -
    - -

    Handle a mouse scroll up event.

    +
    Attributes
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.ui.FocusableSingletonBitmappySprite.__instance__ + + + + class-attribute + instance-attribute + + +
    +
    __instance__ = None
    +
    + +
    +
    Functions
    +
    -
    - glitchygames.ui.BitmappySprite.break_when +
    + glitchygames.ui.FocusableSingletonBitmappySprite.__new__ - - - classmethod -
    -
    break_when(sprite_type: object | None = None) -> None
    +
    __new__(*args, **kwargs) -> Self
     
    -

    Register a breakpoint for a sprite type.

    +

    Create a new instance of the FocusableSingletonBitmappySprite.

    @@ -6476,13 +5551,17 @@
    • - sprite_type - (object | None, default: - None -) + *args
      -

      The sprite type to break on.

      +

      The arguments to pass to the constructor.

      +
      +
    • +
    • + **kwargs + – +
      +

      The keyword arguments to pass to the constructor.

    @@ -6503,10 +5582,10 @@
    • - None - – +FocusableSingletonBitmappySprite( Self +) –
      -

      None

      +

      The instance of the FocusableSingletonBitmappySprite.

    @@ -6523,17 +5602,24 @@
    -
    - glitchygames.ui.BitmappySprite.dt_tick +
    + glitchygames.ui.FocusableSingletonBitmappySprite.__init__
    -
    dt_tick(dt: float) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Update the sprite's delta time.

    +

    Initialize the FocusableSingletonBitmappySprite.

    @@ -6548,11 +5634,55 @@
    • - dt - (float) + x + (int) –
      -

      The new delta time.

      +

      The x coordinate of the sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the sprite.

      +
      +
    • +
    • + name + (str, default: + None +) + – +
      +

      The name of the sprite.

      +
      +
    • +
    • + groups + (LayeredDirty, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -6589,276 +5719,426 @@
    -
    +
    +
    -
    - glitchygames.ui.BitmappySprite.update +
    -
    -
    update() -> None
    -
    +
    -
    - -

    Update the sprite.

    +

    + glitchygames.ui.Sprite - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -

    -
    +
    -
    +
    +

    + Bases: RootSprite

    + +

    A convenience class for handling all of the common sprite behaviors.

    -
    - glitchygames.ui.BitmappySprite.on_joy_axis_motion_event + +
    -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +
    Attributes
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + +
    + glitchygames.ui.Sprite.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    - -
    +
    -
    - glitchygames.ui.BitmappySprite.on_joy_button_down_event +
    + glitchygames.ui.Sprite.USE_GFXDRAW + + + class-attribute + instance-attribute +
    -
    on_joy_button_down_event(event: Event) -> None
    +
    USE_GFXDRAW: ClassVar = False
     
    - -

    Handle a joystick button down event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.ui.Sprite.PROXIES + + + + class-attribute + instance-attribute + + +
    +
    PROXIES: ClassVar = [sprite]
    +
    + +
    - -
    +
    -
    - glitchygames.ui.BitmappySprite.on_joy_button_up_event +
    + glitchygames.ui.Sprite.SPRITE_BREAKPOINTS + + + class-attribute + instance-attribute +
    -
    on_joy_button_up_event(event: Event) -> None
    +
    SPRITE_BREAKPOINTS: ClassVar = None
     
    - -

    Handle a joystick button up event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.ui.Sprite.SPRITE_COUNTERS + + + + class-attribute + instance-attribute + + +
    +
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    +
    + +
    - -
    +
    -
    - glitchygames.ui.BitmappySprite.on_joy_hat_motion_event +
    + glitchygames.ui.Sprite.SPRITE_COUNT + + + class-attribute + instance-attribute +
    -
    on_joy_hat_motion_event(event: Event) -> None
    +
    SPRITE_COUNT = 0
     
    - -

    Handle a joystick hat motion event.

    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.image + + + + instance-attribute + + +
    +
    image = Surface((width, height))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.rect + + + + instance-attribute + + +
    +
    rect = get_rect()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.dt + + + + instance-attribute + + +
    +
    dt = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.dt_timer + + + + instance-attribute + + +
    +
    dt_timer = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.name + + + + instance-attribute + + +
    +
    name = name
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.parent + + + + instance-attribute + + +
    +
    parent = parent
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.proxies + + + + instance-attribute + + +
    +
    proxies = [self]
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.callbacks + + + + instance-attribute + + +
    +
    callbacks = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.screen + + + + instance-attribute + + +
    +
    screen = get_surface()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.screen_width + + + + instance-attribute + + +
    +
    screen_width = get_width()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.screen_height + + + + instance-attribute + + +
    +
    screen_height = get_height()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.width + + + + property + writable + + +
    +
    width: int
    +
    + +
    + +

    Return the width of the sprite.

    @@ -6869,22 +6149,45 @@
    - Parameters: - -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    - + Returns: + +
      +
    • +int( int +) – +
      +

      The width of the sprite.

      +
      +
    • +
    + - +
    + +
    + +
    + + + +
    + glitchygames.ui.Sprite.height + + + + property + writable + + +
    +
    height: int
    +
    + +
    + +

    Return the height of the sprite.

    + @@ -6898,37 +6201,42 @@
    • - None - – +int( int +) –
      -

      None

      +

      The height of the sprite.

    -
    -
    +
    +
    Functions
    +
    -
    - glitchygames.ui.BitmappySprite.on_joy_ball_motion_event +
    + glitchygames.ui.Sprite.break_when + + + classmethod +
    -
    on_joy_ball_motion_event(event: Event) -> None
    +
    break_when(sprite_type: object | None = None) -> None
     
    -

    Handle a joystick ball motion event.

    +

    Register a breakpoint for a sprite type.

    @@ -6943,11 +6251,13 @@
    • - event - (Event) + sprite_type + (object | None, default: + None +) –
      -

      The event to handle.

      +

      The sprite type to break on.

    @@ -6988,17 +6298,25 @@
    - glitchygames.ui.BitmappySprite.on_mouse_enter_event +
    + glitchygames.ui.Sprite.__init__
    -
    on_mouse_enter_event(event: Event) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a mouse enter event.

    +

    Initialize a Sprite.

    @@ -7013,11 +6331,65 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the sprite.

      +
      +
    • +
    • + name + (str | None, default: + None +) + – +
      +

      The name of the sprite.

      +
      +
    • +
    • + parent + (object | None, default: + None +) + – +
      +

      The parent of the sprite.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -7058,17 +6430,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_exit_event +
    + glitchygames.ui.Sprite.dt_tick
    -
    on_mouse_exit_event(event: Event) -> None
    +
    dt_tick(dt: float) -> None
     
    -

    Handle a mouse exit event.

    +

    Update the sprite's delta time.

    @@ -7083,11 +6455,11 @@
    • - event - (Event) + dt + (float) –
      -

      The event to handle.

      +

      The new delta time.

    @@ -7128,51 +6500,18 @@
    - glitchygames.ui.BitmappySprite.on_mouse_drag_down_event +
    + glitchygames.ui.Sprite.update
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    update() -> None
     
    -

    Handle a mouse drag down event.

    - - +

    Update the sprite.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    @@ -7206,17 +6545,17 @@
    - glitchygames.ui.BitmappySprite.on_left_mouse_drag_down_event +
    + glitchygames.ui.Sprite.on_joy_axis_motion_event
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    on_joy_axis_motion_event(event: Event) -> None
     
    -

    Handle a left mouse drag down event.

    +

    Handle a joystick axis motion event.

    @@ -7238,14 +6577,6 @@
    -

    The object that triggered the event.

    -
    - @@ -7284,17 +6615,17 @@
    - glitchygames.ui.BitmappySprite.on_left_mouse_drag_up_event +
    + glitchygames.ui.Sprite.on_joy_button_down_event
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    on_joy_button_down_event(event: Event) -> None
     
    -

    Handle a left mouse drag up event.

    +

    Handle a joystick button down event.

    @@ -7316,14 +6647,6 @@
    -

    The object that triggered the event.

    -
    - @@ -7362,17 +6685,17 @@
    - glitchygames.ui.BitmappySprite.on_middle_mouse_drag_down_event +
    + glitchygames.ui.Sprite.on_joy_button_up_event
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    on_joy_button_up_event(event: Event) -> None
     
    -

    Handle a middle mouse drag down event.

    +

    Handle a joystick button up event.

    @@ -7394,14 +6717,6 @@
    -

    The object that triggered the event.

    -
    - @@ -7440,17 +6755,17 @@
    - glitchygames.ui.BitmappySprite.on_middle_mouse_drag_up_event +
    + glitchygames.ui.Sprite.on_joy_hat_motion_event
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    on_joy_hat_motion_event(event: Event) -> None
     
    -

    Handle a middle mouse drag up event.

    +

    Handle a joystick hat motion event.

    @@ -7472,12 +6787,74 @@
    +
    + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.ui.Sprite.on_joy_ball_motion_event + + +
    +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick ball motion event.

    + + + + + + + + + + + + @@ -8290,17 +7769,17 @@
    - glitchygames.ui.BitmappySprite.on_sys_wm_event +
    + glitchygames.ui.Sprite.on_mouse_drag_up_event
    -
    on_sys_wm_event(event: Event) -> None
    +
    on_mouse_drag_up_event(event: Event) -> None
     
    -

    Handle a sys wm event.

    +

    Handle a mouse drag up event.

    @@ -8360,17 +7839,17 @@
    -
    - glitchygames.ui.BitmappySprite.on_user_event +
    + glitchygames.ui.Sprite.on_mouse_button_up_event
    -
    on_user_event(event: Event) -> None
    +
    on_mouse_button_up_event(event: Event) -> None
     
    -

    Handle a user event.

    +

    Handle a mouse button up event.

    @@ -8430,48 +7909,17 @@
    -
    - glitchygames.ui.BitmappySprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.BitmappySprite.__init__ +
    + glitchygames.ui.Sprite.on_left_mouse_button_up_event
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    filename: str | None = None,
    -    focusable: bool = False,
    -    parent: object = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    +
    on_left_mouse_button_up_event(event: Event) -> None
     
    -

    Subclass to load sprite files.

    +

    Handle a left mouse button up event.

    @@ -8486,85 +7934,11 @@
    Parameters: +
      +
    • + event + (Event) + –
      -

      The object that triggered the event.

      +

      The event to handle.

    @@ -7518,23 +6895,45 @@
    - glitchygames.ui.BitmappySprite.on_right_mouse_drag_down_event +
    + glitchygames.ui.Sprite.on_mouse_motion_event
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_motion_event(event: Event) -> None
     
    -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    +

    Handle a mouse motion event.

    + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + @@ -7566,17 +6965,17 @@
    - glitchygames.ui.BitmappySprite.on_right_mouse_drag_up_event +
    + glitchygames.ui.Sprite.on_mouse_focus_event
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_focus_event(event: Event, old_focus: object) -> None
     
    -

    Handle a right mouse drag up event.

    +

    Handle a mouse focus event.

    @@ -7599,11 +6998,11 @@
    -

    The object that triggered the event.

    +

    The old focus.

    @@ -7644,17 +7043,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_drag_up_event +
    + glitchygames.ui.Sprite.on_mouse_unfocus_event
    -
    on_mouse_drag_up_event(event: Event) -> None
    +
    on_mouse_unfocus_event(event: Event) -> None
     
    -

    Handle a mouse drag up event.

    +

    Handle a mouse unfocus event.

    @@ -7714,17 +7113,17 @@
    - glitchygames.ui.BitmappySprite.on_key_down_event +
    + glitchygames.ui.Sprite.on_mouse_enter_event
    -
    on_key_down_event(event: Event) -> None
    +
    on_mouse_enter_event(event: Event) -> None
     
    -

    Handle a key down event.

    +

    Handle a mouse enter event.

    @@ -7784,17 +7183,17 @@
    - glitchygames.ui.BitmappySprite.on_key_up_event +
    + glitchygames.ui.Sprite.on_mouse_exit_event
    -
    on_key_up_event(event: Event) -> None
    +
    on_mouse_exit_event(event: Event) -> None
     
    -

    Handle a key up event.

    +

    Handle a mouse exit event.

    @@ -7854,17 +7253,17 @@
    -
    - glitchygames.ui.BitmappySprite.on_key_chord_down_event +
    + glitchygames.ui.Sprite.on_mouse_drag_down_event
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    +
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a key chord down event.

    +

    Handle a mouse drag down event.

    @@ -7887,11 +7286,11 @@
    -

    The keys that were pressed.

    +

    The object that triggered the event.

    @@ -7932,17 +7331,17 @@
    - glitchygames.ui.BitmappySprite.on_key_chord_up_event +
    + glitchygames.ui.Sprite.on_left_mouse_drag_down_event
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    +
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a key chord up event.

    +

    Handle a left mouse drag down event.

    @@ -7965,11 +7364,11 @@
    -

    The keys that were pressed.

    +

    The object that triggered the event.

    @@ -8010,17 +7409,17 @@
    - glitchygames.ui.BitmappySprite.on_quit_event +
    + glitchygames.ui.Sprite.on_left_mouse_drag_up_event
    -
    on_quit_event(event: Event) -> None
    +
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a quit event.

    +

    Handle a left mouse drag up event.

    @@ -8042,6 +7441,14 @@

    The event to handle.

    +
  • + trigger + (object | None) + – +
    +

    The object that triggered the event.

    +
    +
  • @@ -8080,17 +7487,17 @@
    -
    - glitchygames.ui.BitmappySprite.on_active_event +
    + glitchygames.ui.Sprite.on_middle_mouse_drag_down_event
    -
    on_active_event(event: Event) -> None
    +
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
     
    -

    Handle an active event.

    +

    Handle a middle mouse drag down event.

    @@ -8112,6 +7519,14 @@

    The event to handle.

    +
  • + trigger + (object | None) + – +
    +

    The object that triggered the event.

    +
    +
  • @@ -8150,17 +7565,17 @@
    -
    - glitchygames.ui.BitmappySprite.on_video_resize_event +
    + glitchygames.ui.Sprite.on_middle_mouse_drag_up_event
    -
    on_video_resize_event(event: Event) -> None
    +
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a video resize event.

    +

    Handle a middle mouse drag up event.

    @@ -8182,6 +7597,14 @@
    +

    The object that triggered the event.

    +
    + @@ -8220,17 +7643,65 @@
    - glitchygames.ui.BitmappySprite.on_video_expose_event +
    + glitchygames.ui.Sprite.on_right_mouse_drag_down_event
    -
    on_video_expose_event(event: Event) -> None
    +
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a video expose event.

    +

    Handle a right mouse drag down event.

    +

    Args: +event (pygame.event.Event): The event to handle. +trigger (object | None): The object that triggered the event.

    + + + +
    + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.ui.Sprite.on_right_mouse_drag_up_event + + +
    +
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drag up event.

    @@ -8252,6 +7723,14 @@
    +

    The object that triggered the event.

    +
    +
    • - x - (int) - – -
      -

      the x coordinate of the sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      the y coordinate of the sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - name - (str | None, default: - None -) - – -
      -

      optional, the name of the sprite.

      -
      -
    • -
    • - filename - (str | None, default: - None -) - – -
      -

      optional, the BitmappySprite config to load.

      -
      -
    • -
    • - focusable - (bool, default: - False -) - – -
      -

      optional, whether or not the sprite can receive focus.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      optional, the parent of the sprite.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) + event + (Event) –
      -

      optional, the sprite groups to add the sprite to.

      +

      The event to handle.

    @@ -8605,17 +7979,17 @@
    -
    - glitchygames.ui.BitmappySprite.load +
    + glitchygames.ui.Sprite.on_middle_mouse_button_up_event
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    +
    on_middle_mouse_button_up_event(event: Event) -> None
     
    -

    Load a sprite from a Bitmappy config file.

    +

    Handle a middle mouse button up event.

    @@ -8630,11 +8004,11 @@
    • - filename - (str) + event + (Event) –
      -

      the filename of the Bitmappy config file.

      +

      The event to handle.

    @@ -8655,10 +8029,10 @@
    • - tuple[Surface, Rect, str] + None
      -

      A tuple containing the sprite's image, rect, and name.

      +

      None

    @@ -8666,37 +8040,6 @@
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    @@ -8706,21 +8049,17 @@
    -
    - glitchygames.ui.BitmappySprite.inflate +
    + glitchygames.ui.Sprite.on_right_mouse_button_up_event - - - classmethod -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    +
    on_right_mouse_button_up_event(event: Event) -> None
     
    -

    Inflate a sprite from a list of pixels.

    +

    Handle a right mouse button up event.

    @@ -8735,35 +8074,11 @@
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) + event + (Event) –
      -

      the color map.

      +

      The event to handle.

    @@ -8784,10 +8099,10 @@
    • - tuple[Surface, Rect] + None
      -

      A tuple containing the sprite's image and rect.

      +

      None

    @@ -8804,17 +8119,17 @@
    -
    - glitchygames.ui.BitmappySprite.save +
    + glitchygames.ui.Sprite.on_mouse_button_down_event
    -
    save(filename: str) -> None
    +
    on_mouse_button_down_event(event: Event) -> None
     
    -

    Save a sprite to a Bitmappy config file.

    +

    Handle a mouse button down event.

    @@ -8829,11 +8144,11 @@
    • - filename - (str) + event + (Event) –
      -

      the filename of the Bitmappy config file.

      +

      The event to handle.

    @@ -8874,20 +8189,45 @@
    -
    - glitchygames.ui.BitmappySprite.deflate +
    + glitchygames.ui.Sprite.on_left_mouse_button_down_event
    -
    deflate() -> dict
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Deflate a sprite to a Bitmappy config file.

    +

    Handle a left mouse button down event.

    + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + @@ -8899,10 +8239,10 @@
    @@ -8997,17 +8329,17 @@
    - glitchygames.ui.BitmappySprite.on_middle_mouse_drag_event +
    + glitchygames.ui.Sprite.on_right_mouse_button_down_event
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_right_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a middle mouse drag event.

    +

    Handle a right mouse button down event.

    @@ -9029,14 +8361,6 @@
    -

    The object that triggered the event.

    -
    - @@ -9075,17 +8399,17 @@
    - glitchygames.ui.BitmappySprite.on_right_mouse_drag_event +
    + glitchygames.ui.Sprite.on_mouse_scroll_down_event
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_scroll_down_event(event: Event) -> None
     
    -

    Handle a right mouse drag event.

    +

    Handle a mouse scroll down event.

    @@ -9107,14 +8431,6 @@
    -

    The object that triggered the event.

    -
    - @@ -9153,17 +8469,17 @@
    - glitchygames.ui.BitmappySprite.on_left_mouse_drop_event +
    + glitchygames.ui.Sprite.on_mouse_scroll_up_event
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_scroll_up_event(event: Event) -> None
     
    -

    Handle a left mouse drop event.

    +

    Handle a mouse scroll up event.

    @@ -9185,14 +8501,6 @@
    -

    The object that triggered the event.

    -
    - @@ -9231,17 +8539,17 @@
    - glitchygames.ui.BitmappySprite.on_middle_mouse_drop_event +
    + glitchygames.ui.Sprite.on_mouse_chord_up_event
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_chord_up_event(event: Event) -> None
     
    -

    Handle a middle mouse drop event.

    +

    Handle a mouse chord up event.

    @@ -9263,14 +8571,6 @@
    -

    The object that triggered the event.

    -
    - @@ -9309,17 +8609,17 @@
    - glitchygames.ui.BitmappySprite.on_right_mouse_drop_event +
    + glitchygames.ui.Sprite.on_mouse_chord_down_event
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_chord_down_event(event: Event) -> None
     
    -

    Handle a right mouse drop event.

    +

    Handle a mouse chord down event.

    @@ -9341,14 +8641,6 @@
    -

    The object that triggered the event.

    -
    - @@ -9387,17 +8679,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_drag_event +
    + glitchygames.ui.Sprite.on_key_down_event
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_key_down_event(event: Event) -> None
     
    -

    Handle a mouse drag event.

    +

    Handle a key down event.

    @@ -9419,12 +8711,74 @@
    +
    + + + + + + + + + +
    • - dict + None
      -

      A dict containing the sprite's config.

      +

      None

    @@ -8919,17 +8259,17 @@
    -
    - glitchygames.ui.BitmappySprite.on_left_mouse_drag_event +
    + glitchygames.ui.Sprite.on_middle_mouse_button_down_event
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_middle_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a left mouse drag event.

    +

    Handle a middle mouse button down event.

    @@ -8951,14 +8291,6 @@
    -

    The object that triggered the event.

    -
    -
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.ui.Sprite.on_key_up_event + + +
    +
    on_key_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a key up event.

    + + + + + + + + + + + + @@ -9699,17 +9045,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_chord_up_event +
    + glitchygames.ui.Sprite.on_active_event
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    +
    on_active_event(event: Event) -> None
     
    -

    Handle a mouse chord up event.

    +

    Handle an active event.

    @@ -9731,61105 +9077,74 @@
    +
    + + + + + + + + + +
    Parameters: +
    • - trigger - (object | None) + event + (Event) –
      -

      The object that triggered the event.

      +

      The event to handle.

    @@ -9465,17 +8819,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_drop_event +
    + glitchygames.ui.Sprite.on_key_chord_down_event
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_key_chord_down_event(event: Event, keys: list) -> None
     
    -

    Handle a mouse drop event.

    +

    Handle a key chord down event.

    @@ -9498,11 +8852,11 @@
    -

    The object that triggered the event.

    +

    The keys that were pressed.

    @@ -9543,17 +8897,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_wheel_event +
    + glitchygames.ui.Sprite.on_key_chord_up_event
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    +
    on_key_chord_up_event(event: Event, keys: list) -> None
     
    -

    Handle a mouse wheel event.

    +

    Handle a key chord up event.

    @@ -9576,11 +8930,11 @@
    -

    The object that triggered the event.

    +

    The keys that were pressed.

    @@ -9621,17 +8975,17 @@
    - glitchygames.ui.BitmappySprite.on_mouse_chord_down_event +
    + glitchygames.ui.Sprite.on_quit_event
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    +
    on_quit_event(event: Event) -> None
     
    -

    Handle a mouse chord down event.

    +

    Handle a quit event.

    @@ -9653,14 +9007,6 @@
    -

    The keys that were pressed.

    -
    -
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.ui.Sprite.on_video_resize_event + + +
    +
    on_video_resize_event(event: Event) -> None
    +
    + +
    + +

    Handle a video resize event.

    + + + + + + + + + + + + - - -
    Parameters: +
    • - keys - (list) + event + (Event) –
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.FocusableSingletonBitmappySprite - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A singleton class for handling all of the focusable sprite behaviors.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.__instance__ - - - - class-attribute - instance-attribute - - -
    -
    __instance__ = None
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.__new__ - - -
    -
    __new__(*args, **kwargs) -> Self
    -
    - -
    - -

    Create a new instance of the FocusableSingletonBitmappySprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - *args - – -
      -

      The arguments to pass to the constructor.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments to pass to the constructor.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • -FocusableSingletonBitmappySprite( Self -) – -
      -

      The instance of the FocusableSingletonBitmappySprite.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.FocusableSingletonBitmappySprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize the FocusableSingletonBitmappySprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the sprite.

      -
      -
    • -
    • - name - (str, default: - None -) - – -
      -

      The name of the sprite.

      -
      -
    • -
    • - groups - (LayeredDirty, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.Sprite - - -

    - - -
    -

    - Bases: RootSprite

    - - -

    A convenience class for handling all of the common sprite behaviors.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.Sprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.proxies - - - - instance-attribute - - -
    -
    proxies = [self]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.width - - - - property - writable - - -
    -
    width: int
    -
    - -
    - -

    Return the width of the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The width of the sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.Sprite.height - - - - property - writable - - -
    -
    height: int
    -
    - -
    - -

    Return the height of the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The height of the sprite.

      -
      -
    • -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.Sprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a Sprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the sprite.

      -
      -
    • -
    • - name - (str | None, default: - None -) - – -
      -

      The name of the sprite.

      -
      -
    • -
    • - parent - (object | None, default: - None -) - – -
      -

      The parent of the sprite.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.Sprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.MenuBar - - -

    - - -
    -

    - Bases: FocusableSingletonBitmappySprite

    - - -

    A menu bar class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.MenuBar.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.__instance__ - - - - class-attribute - instance-attribute - - -
    -
    __instance__ = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.all_sprites - - - - instance-attribute - - -
    -
    all_sprites = groups
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.background_color - - - - instance-attribute - - -
    -
    background_color = (0, 255, 0)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.border_width - - - - instance-attribute - - -
    -
    border_width = 2
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.menu_items - - - - instance-attribute - - -
    -
    menu_items = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.menu_offset_x - - - - instance-attribute - - -
    -
    menu_offset_x = border_width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.menu_offset_y - - - - instance-attribute - - -
    -
    menu_offset_y = border_width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.has_focus - - - - instance-attribute - - -
    -
    has_focus = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuBar.dirty - - - - instance-attribute - - -
    -
    dirty = 2
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.MenuBar.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.__new__ - - -
    -
    __new__(*args, **kwargs) -> Self
    -
    - -
    - -

    Create a new instance of the FocusableSingletonBitmappySprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - *args - – -
      -

      The arguments to pass to the constructor.

      -
      -
    • -
    • - **kwargs - – -
      -

      The keyword arguments to pass to the constructor.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • -FocusableSingletonBitmappySprite( Self -) – -
      -

      The instance of the FocusableSingletonBitmappySprite.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a MenuBar.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the menu bar.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the menu bar.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the menu bar.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the menu bar.

      -
      -
    • -
    • - name - (str | None, default: - None -) - – -
      -

      The name of the menu bar.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.add_menu - - -
    -
    add_menu(menu: MenuItem) -> None
    -
    - -
    - -

    Add a menu to the menu bar.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - menu - (MenuItem) - – -
      -

      The menu to add.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.add_menu_item - - -
    -
    add_menu_item(menu_item: MenuItem, menu: MenuBar | None = None) -> None
    -
    - -
    - -

    Add a menu item to the menu bar.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - menu_item - (MenuItem) - – -
      -

      The menu item to add.

      -
      -
    • -
    • - menu - (MenuBar | None, default: - None -) - – -
      -

      The menu to add the menu item to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the menu bar.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object) -> None
    -
    - -
    - -

    Handle left mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse drop events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event) -> None
    -
    - -
    - -

    Handle middle mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event) -> None
    -
    - -
    - -

    Handle middle mouse drop events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object) -> None
    -
    - -
    - -

    Handle mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object) -> None
    -
    - -
    - -

    Handle mouse drop events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse motion events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse enter events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse exit events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event) -> None
    -
    - -
    - -

    Handle right mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event) -> None
    -
    - -
    - -

    Handle right mouse drop events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuBar.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse wheel events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.MenuItem - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A menu item class.

    -

    This class represents a menu item. It can be a root level menu item or a sub menu item.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - BitmappySprite - (BitmappySprite) - – -
      -

      The base sprite class.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - – -
      -

      None

      -
      -
    • -
    -
    - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.MenuItem.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.all_sprites - - - - instance-attribute - - -
    -
    all_sprites = groups
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.background_color - - - - instance-attribute - - -
    -
    background_color = (255, 0, 255)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.border_width - - - - instance-attribute - - -
    -
    border_width = 2
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_items - - - - instance-attribute - - -
    -
    menu_items = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_offset_x - - - - instance-attribute - - -
    -
    menu_offset_x = border_width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_offset_y - - - - instance-attribute - - -
    -
    menu_offset_y = border_width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_image - - - - instance-attribute - - -
    -
    menu_image = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_rect - - - - instance-attribute - - -
    -
    menu_rect = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.active - - - - instance-attribute - - -
    -
    active = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.text - - - - instance-attribute - - -
    -
    text = TextSprite(
    -    background_color=background_color,
    -    text_color=(0, 0, 0),
    -    x=x,
    -    y=y,
    -    width=width,
    -    height=height,
    -    text=name,
    -    parent=parent,
    -    groups=groups,
    -)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_up_image - - - - instance-attribute - - -
    -
    menu_up_image = image
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_up_rect - - - - instance-attribute - - -
    -
    menu_up_rect = rect
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_down_image - - - - instance-attribute - - -
    -
    menu_down_image = menu_up_image
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.MenuItem.menu_down_rect - - - - instance-attribute - - -
    -
    menu_down_rect = menu_up_rect
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.MenuItem.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.__init__ - - -
    -
    __init__(
    -    x: int = 0,
    -    y: int = 0,
    -    width: int = 1,
    -    height: int = 1,
    -    name: str | None = None,
    -    filename: str | None = None,
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a MenuItem.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int, default: - 0 -) - – -
      -

      The x coordinate of the menu item.

      -
      -
    • -
    • - y - (int, default: - 0 -) - – -
      -

      The y coordinate of the menu item.

      -
      -
    • -
    • - width - (int, default: - 1 -) - – -
      -

      The width of the menu item.

      -
      -
    • -
    • - height - (int, default: - 1 -) - – -
      -

      The height of the menu item.

      -
      -
    • -
    • - name - (str | None, default: - None -) - – -
      -

      The name of the menu item.

      -
      -
    • -
    • - filename - (str | None, default: - None -) - – -
      -

      The filename of the menu item.

      -
      -
    • -
    • - parent - (object | None, default: - None -) - – -
      -

      The parent of the menu item.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.add - - -
    -
    add(*groups: LayeredDirty) -> None
    -
    - -
    - -

    Add the sprite to a group.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - *groups - (LayeredDirty, default: - () -) - – -
      -

      The groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.add_menu - - -
    -
    add_menu(menu: MenuItem) -> None
    -
    - -
    - -

    Add a menu to the menu item.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - menu - (MenuItem) - – -
      -

      The menu to add.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.add_menu_item - - -
    -
    add_menu_item(menu_item: MenuItem, menu: MenuBar) -> None
    -
    - -
    - -

    Add a menu item to the menu item.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - menu_item - (MenuItem) - – -
      -

      The menu item to add.

      -
      -
    • -
    • - menu - (MenuBar) - – -
      -

      The menu to add the menu item to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the menu item.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse drop events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event) -> None
    -
    - -
    - -

    Handle middle mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event) -> None
    -
    - -
    - -

    Handle middle mouse drop events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse drop events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse motion events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse enter events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse exit events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event) -> None
    -
    - -
    - -

    Handle right mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event) -> None
    -
    - -
    - -

    Handle right mouse drop events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.MenuItem.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse wheel events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.TextSprite - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A text sprite class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.TextSprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.background_color - - - - instance-attribute - - -
    -
    background_color = (255, 0, 255)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.active_color - - - - instance-attribute - - -
    -
    active_color = background_color
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.click_color - - - - instance-attribute - - -
    -
    click_color = (0, 255, 128)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.hover_color - - - - instance-attribute - - -
    -
    hover_color = (255, 255, 0)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.text - - - - instance-attribute - - -
    -
    text = text
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.font_manager - - - - instance-attribute - - -
    -
    font_manager = FontManager(GameEngine)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.alpha - - - - instance-attribute - - -
    -
    alpha = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.text_box - - - - instance-attribute - - -
    -
    text_box = TextBox(
    -    font=font(), x=x, y=x, text=text, text_color=text_color, parent=self, groups=groups
    -)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.x - - - - property - writable - - -
    -
    x: int
    -
    - -
    - -

    Get the x coordinate of the text sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The x coordinate of the text sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextSprite.y - - - - property - writable - - -
    -
    y: int
    -
    - -
    - -

    Get the y coordinate of the text sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The y coordinate of the text sprite.

      -
      -
    • -
    -
    - -
    -
    Classes
    - -
    - - - -
    - glitchygames.ui.TextSprite.TextBox - - -
    - - -
    -

    - Bases: Sprite

    - - -

    A text box class.

    - - - - -
    - - - - - -Attributes - -
    - - - - - glitchygames.ui.TextSprite.TextBox.rect - - - - instance-attribute - - - -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.image - - - - instance-attribute - - - -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.USE_GFXDRAW - - - - class-attribute - instance-attribute - - - -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.PROXIES - - - - class-attribute - instance-attribute - - - -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - - -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - - -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.SPRITE_COUNT - - - - class-attribute - instance-attribute - - - -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.dt - - - - instance-attribute - - - -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.dt_timer - - - - instance-attribute - - - -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.callbacks - - - - instance-attribute - - - -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.screen - - - - instance-attribute - - - -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.screen_width - - - - instance-attribute - - - -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.screen_height - - - - instance-attribute - - - -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.width - - - - property - writable - - - -
    width: int
    -
    - -
    - -

    Return the width of the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The width of the sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.height - - - - property - writable - - - -
    height: int
    -
    - -
    - -

    Return the height of the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The height of the sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.log - - - - class-attribute - instance-attribute - - - -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.start_x - - - - instance-attribute - - - -
    start_x = x
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.start_y - - - - instance-attribute - - - -
    start_y = y
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.line_height - - - - instance-attribute - - - -
    line_height = line_height
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.text_color - - - - instance-attribute - - - -
    text_color = text_color
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.text_hover_color - - - - instance-attribute - - - -
    text_hover_color = (255, 255, 255)
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.text_click_color - - - - instance-attribute - - - -
    text_click_color = (63, 127, 255)
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.background_color - - - - instance-attribute - - - -
    background_color = (255, 0, 255)
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.background_hover_color - - - - instance-attribute - - - -
    background_hover_color = (0, 255, 128)
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.background_click_color - - - - instance-attribute - - - -
    background_click_color = (255, 127, 63)
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.active_text_color - - - - instance-attribute - - - -
    active_text_color = text_color
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.active_background_color - - - - instance-attribute - - - -
    active_background_color = background_color
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.font - - - - instance-attribute - - - -
    font = font
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.name - - - - instance-attribute - - - -
    name = text
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.parent - - - - instance-attribute - - - -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.proxies - - - - instance-attribute - - - -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.x - - - - property - writable - - - -
    x: int
    -
    - -
    - -

    Get the x coordinate of the text box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The x coordinate of the text box.

      -
      -
    • -
    -
    - -
    - -
    - - - - - glitchygames.ui.TextSprite.TextBox.y - - - - property - writable - - - -
    y: int
    -
    - -
    - -

    Get the y coordinate of the text box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The y coordinate of the text box.

      -
      -
    • -
    -
    - -
    - -Functions - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.__subclasshook__ - - - - classmethod - - - -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_motion_event - - - -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_drag_event - - - -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_drop_event - - - -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_left_mouse_drag_event - - - -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_left_mouse_drop_event - - - -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_middle_mouse_drag_event - - - -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_middle_mouse_drop_event - - - -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_right_mouse_drag_event - - - -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_right_mouse_drop_event - - - -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_focus_event - - - -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_unfocus_event - - - -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_button_up_event - - - -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_left_mouse_button_up_event - - - -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_middle_mouse_button_up_event - - - -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_right_mouse_button_up_event - - - -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_button_down_event - - - -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_left_mouse_button_down_event - - - -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_middle_mouse_button_down_event - - - -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_right_mouse_button_down_event - - - -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_scroll_down_event - - - -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_scroll_up_event - - - -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_wheel_event - - - -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.break_when - - - - classmethod - - - -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.dt_tick - - - -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.update - - - -
    update() -> None
    -
    - -
    - -

    Update the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_joy_axis_motion_event - - - -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_joy_button_down_event - - - -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_joy_button_up_event - - - -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_joy_hat_motion_event - - - -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_joy_ball_motion_event - - - -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_enter_event - - - -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_exit_event - - - -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_drag_down_event - - - -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_left_mouse_drag_down_event - - - -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_left_mouse_drag_up_event - - - -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_middle_mouse_drag_down_event - - - -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_middle_mouse_drag_up_event - - - -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_right_mouse_drag_down_event - - - -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_right_mouse_drag_up_event - - - -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_drag_up_event - - - -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_chord_up_event - - - -
    on_mouse_chord_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_mouse_chord_down_event - - - -
    on_mouse_chord_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_key_down_event - - - -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_key_up_event - - - -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_key_chord_down_event - - - -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_key_chord_up_event - - - -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_quit_event - - - -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_active_event - - - -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_video_resize_event - - - -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_video_expose_event - - - -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_sys_wm_event - - - -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.on_user_event - - - -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.__str__ - - - -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.__init__ - - - -
    __init__(
    -    font: str,
    -    x: int,
    -    y: int,
    -    line_height: int = 15,
    -    text: str = "Text",
    -    text_color: tuple = WHITE,
    -    parent: object = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a TextBox.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - font - (str) - – -
      -

      The font to use.

      -
      -
    • -
    • - x - (int) - – -
      -

      The x coordinate of the text box.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the text box.

      -
      -
    • -
    • - line_height - (int, default: - 15 -) - – -
      -

      The line height of the text box.

      -
      -
    • -
    • - text - (str, default: - 'Text' -) - – -
      -

      The text to display in the text box.

      -
      -
    • -
    • - text_color - (tuple, default: - WHITE -) - – -
      -

      The color of the text.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      The parent object.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.print_text - - - -
    print_text(surface: Surface, string: str) -> None
    -
    - -
    - -

    Print text to the text box.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - surface - (Surface) - – -
      -

      The surface to print the text to.

      -
      -
    • -
    • - string - (str) - – -
      -

      The text to print.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.reset - - - -
    reset() -> None
    -
    - -
    - -

    Reset the text box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.indent - - - -
    indent() -> None
    -
    - -
    - -

    Indent the text box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.TextSprite.TextBox.unindent - - - -
    unindent() -> None
    -
    - -
    - -

    Unindent the text box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    -
    Functions
    - - -
    - - - -
    - glitchygames.ui.TextSprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    background_color: tuple = BLACKLUCENT,
    -    text_color: tuple = WHITE,
    -    alpha: int = 0,
    -    text: str = "Text",
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a TextSprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the text sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the text sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the text sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the text sprite.

      -
      -
    • -
    • - name - (str, default: - None -) - – -
      -

      The name of the text sprite.

      -
      -
    • -
    • - background_color - (tuple, default: - BLACKLUCENT -) - – -
      -

      The background color of the text sprite.

      -
      -
    • -
    • - text_color - (tuple, default: - WHITE -) - – -
      -

      The color of the text.

      -
      -
    • -
    • - alpha - (int, default: - 0 -) - – -
      -

      The alpha value of the text sprite.

      -
      -
    • -
    • - text - (str, default: - 'Text' -) - – -
      -

      The text to display in the text sprite.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      The parent object.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.update_nested_sprites - - -
    -
    update_nested_sprites() -> None
    -
    - -
    - -

    Update the nested sprites.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the text sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.add - - -
    -
    add(*groups: LayeredDirty) -> None
    -
    - -
    - -

    Add the sprite to a group.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - *groups - (LayeredDirty, default: - () -) - – -
      -

      The groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, focus: object) -> None
    -
    - -
    - -

    Handle mouse focus events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - focus - (object) - – -
      -

      The object that has focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse unfocus events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextSprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.ButtonSprite - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A button sprite class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.border_color - - - - instance-attribute - - -
    -
    border_color = (255, 255, 255)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.active_color - - - - instance-attribute - - -
    -
    active_color = (128, 128, 128)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.inactive_color - - - - instance-attribute - - -
    -
    inactive_color = (0, 0, 0)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.background_color - - - - instance-attribute - - -
    -
    background_color = inactive_color
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.text - - - - instance-attribute - - -
    -
    text = TextSprite(
    -    background_color=background_color,
    -    x=centerx if parent else x,
    -    y=centery if parent else y,
    -    width=width,
    -    height=height,
    -    text=name,
    -    parent=self,
    -    groups=groups,
    -)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.x - - - - property - writable - - -
    -
    x: int
    -
    - -
    - -

    Get the x coordinate of the button sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The x coordinate of the button sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ButtonSprite.y - - - - property - writable - - -
    -
    y: int
    -
    - -
    - -

    Get the y coordinate of the button sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The y coordinate of the button sprite.

      -
      -
    • -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a ButtonSprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the button sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the button sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the button sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the button sprite.

      -
      -
    • -
    • - name - (str, default: - None -) - – -
      -

      The name of the button sprite.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      The parent object.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.update_nested_sprites - - -
    -
    update_nested_sprites() -> None
    -
    - -
    - -

    Update the nested sprites.

    -

    Sets the dirty flag on the nested sprites.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ButtonSprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.CheckboxSprite - - -

    - - -
    -

    - Bases: ButtonSprite

    - - -

    A checkbox sprite class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.border_color - - - - instance-attribute - - -
    -
    border_color = (255, 255, 255)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.active_color - - - - instance-attribute - - -
    -
    active_color = (128, 128, 128)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.inactive_color - - - - instance-attribute - - -
    -
    inactive_color = (0, 0, 0)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.background_color - - - - instance-attribute - - -
    -
    background_color = inactive_color
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.text - - - - instance-attribute - - -
    -
    text = TextSprite(
    -    background_color=background_color,
    -    x=centerx if parent else x,
    -    y=centery if parent else y,
    -    width=width,
    -    height=height,
    -    text=name,
    -    parent=self,
    -    groups=groups,
    -)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.x - - - - property - writable - - -
    -
    x: int
    -
    - -
    - -

    Get the x coordinate of the button sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The x coordinate of the button sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.y - - - - property - writable - - -
    -
    y: int
    -
    - -
    - -

    Get the y coordinate of the button sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The y coordinate of the button sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.checked - - - - instance-attribute - - -
    -
    checked = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.CheckboxSprite.color - - - - instance-attribute - - -
    -
    color = (128, 128, 128)
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.update_nested_sprites - - -
    -
    update_nested_sprites() -> None
    -
    - -
    - -

    Update the nested sprites.

    -

    Sets the dirty flag on the nested sprites.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    callbacks: Callable | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a CheckboxSprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the checkbox sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the checkbox sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the checkbox sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the checkbox sprite.

      -
      -
    • -
    • - name - (str, default: - None -) - – -
      -

      The name of the checkbox sprite.

      -
      -
    • -
    • - callbacks - (Callable, default: - None -) - – -
      -

      The callbacks to call when events occur.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the checkbox sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.CheckboxSprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.InputBox - - -

    - - -
    -

    - Bases: Sprite

    - - -

    An input box class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.InputBox.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.proxies - - - - instance-attribute - - -
    -
    proxies = [self]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.width - - - - property - writable - - -
    -
    width: int
    -
    - -
    - -

    Return the width of the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The width of the sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.height - - - - property - writable - - -
    -
    height: int
    -
    - -
    - -

    Return the height of the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The height of the sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.offset_x - - - - instance-attribute - - -
    -
    offset_x = x if parent else 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.offset_y - - - - instance-attribute - - -
    -
    offset_y = y if parent else 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.rect - - - - instance-attribute - - -
    -
    rect = Rect(x, y, width, height)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.color - - - - instance-attribute - - -
    -
    color = color
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.font - - - - instance-attribute - - -
    -
    font = SysFont('Times', 14)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.text - - - - instance-attribute - - -
    -
    text = text
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.text_image - - - - instance-attribute - - -
    -
    text_image = render(text, True, color)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.active - - - - instance-attribute - - -
    -
    active = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.cursor_rect - - - - instance-attribute - - -
    -
    cursor_rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.cursor - - - - instance-attribute - - -
    -
    cursor = Rect(topright, (3, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.InputBox.dirty - - - - instance-attribute - - -
    -
    dirty = 2
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.InputBox.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    color: tuple = (233, 248, 215),
    -    text: str = "",
    -    name: str | None = None,
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize an InputBox.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the input box.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the input box.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the input box.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the input box.

      -
      -
    • -
    • - color - (tuple, default: - (233, 248, 215) -) - – -
      -

      The color of the input box.

      -
      -
    • -
    • - text - (str, default: - '' -) - – -
      -

      The text to display in the input box.

      -
      -
    • -
    • - name - (str, default: - None -) - – -
      -

      The name of the input box.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      The parent object.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.activate - - -
    -
    activate() -> None
    -
    - -
    - -

    Activate the input box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.deactivate - - -
    -
    deactivate() -> None
    -
    - -
    - -

    Deactivate the input box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_input_box_submit_event - - -
    -
    on_input_box_submit_event(event: Event) -> None
    -
    - -
    - -

    Handle input box submit events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the input box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.render - - -
    -
    render() -> None
    -
    - -
    - -

    Render the input box.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_mouse_up_event - - -
    -
    on_mouse_up_event(event: Event) -> None
    -
    - -
    - -

    Handle mouse up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle key up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.InputBox.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle key down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.TextBoxSprite - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A text box sprite class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.value - - - - instance-attribute - - -
    -
    value = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.background_color - - - - instance-attribute - - -
    -
    background_color = (0, 0, 0)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.border_width - - - - instance-attribute - - -
    -
    border_width = 1
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = callbacks
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.text_box - - - - instance-attribute - - -
    -
    text_box = TextSprite(
    -    background_color=background_color,
    -    x=x,
    -    y=y,
    -    width=width - border_width,
    -    height=height - border_width,
    -    text=value,
    -    parent=self,
    -    groups=groups,
    -)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.x - - - - instance-attribute - - -
    -
    x = x
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.y - - - - instance-attribute - - -
    -
    y = y
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.TextBoxSprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    callbacks: Callable | None = None,
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a TextBoxSprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the text box sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the text box sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the text box sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the text box sprite.

      -
      -
    • -
    • - name - (str, default: - None -) - – -
      -

      The name of the text box sprite.

      -
      -
    • -
    • - callbacks - (Callable, default: - None -) - – -
      -

      The callbacks to call when events occur.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      The parent object.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.update_nested_sprites - - -
    -
    update_nested_sprites() -> None
    -
    - -
    - -

    Update the nested sprites.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the text box sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.TextBoxSprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button up events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.SliderSprite - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A slider sprite class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.SliderSprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.text_sprite - - - - instance-attribute - - -
    -
    text_sprite = TextSprite(
    -    x=257, y=y, width=40, height=16, name=str((0, 0, 0)), parent=self, groups=groups
    -)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.slider_knob - - - - instance-attribute - - -
    -
    slider_knob = SliderKnobSprite(
    -    x=x,
    -    y=y - 1,
    -    width=height * 2 - 1,
    -    height=height * 2 - 1,
    -    name=name,
    -    parent=self,
    -    groups=groups,
    -)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.background - - - - instance-attribute - - -
    -
    background = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.value - - - - property - writable - - -
    -
    value: int
    -
    - -
    - -

    Get the value of the slider sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The value of the slider sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.x - - - - property - writable - - -
    -
    x: int
    -
    - -
    - -

    Get the x coordinate of the slider sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The x coordinate of the slider sprite.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.SliderSprite.y - - - - property - writable - - -
    -
    y: int
    -
    - -
    - -

    Get the y coordinate of the slider sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -int( int -) – -
      -

      The y coordinate of the slider sprite.

      -
      -
    • -
    -
    - -
    -
    Classes
    - -
    - - - -
    - glitchygames.ui.SliderSprite.SliderKnobSprite - - -
    - - -
    -

    - Bases: BitmappySprite

    - - -

    A slider knob sprite class.

    - - - - -
    - - - - - -Attributes - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.image - - - - instance-attribute - - - -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - - -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.PROXIES - - - - class-attribute - instance-attribute - - - -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - - -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - - -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - - -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.dt - - - - instance-attribute - - - -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.dt_timer - - - - instance-attribute - - - -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.name - - - - instance-attribute - - - -
    name = name
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.parent - - - - instance-attribute - - - -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.proxies - - - - instance-attribute - - - -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.callbacks - - - - instance-attribute - - - -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.screen - - - - instance-attribute - - - -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.screen_width - - - - instance-attribute - - - -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.screen_height - - - - instance-attribute - - - -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.width - - - - instance-attribute - - - -
    width = width
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.height - - - - instance-attribute - - - -
    height = height
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.DEBUG - - - - class-attribute - instance-attribute - - - -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - - -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - - -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - - -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.filename - - - - instance-attribute - - - -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.focusable - - - - instance-attribute - - - -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.log - - - - class-attribute - instance-attribute - - - -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.value - - - - instance-attribute - - - -
    value = 0
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.rect - - - - instance-attribute - - - -
    rect = Rect(x, y, width, height)
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.x - - - - instance-attribute - - - -
    x = x
    -
    - -
    -
    - -
    - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.y - - - - instance-attribute - - - -
    y = y
    -
    - -
    -
    - -
    - -Functions - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.__subclasshook__ - - - - classmethod - - - -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_motion_event - - - -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_drag_event - - - -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_drop_event - - - -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_left_mouse_drop_event - - - -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_middle_mouse_drag_event - - - -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_middle_mouse_drop_event - - - -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_right_mouse_drag_event - - - -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_right_mouse_drop_event - - - -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_focus_event - - - -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_unfocus_event - - - -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_button_up_event - - - -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_left_mouse_button_up_event - - - -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_middle_mouse_button_up_event - - - -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_right_mouse_button_up_event - - - -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_button_down_event - - - -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_middle_mouse_button_down_event - - - -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_right_mouse_button_down_event - - - -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_scroll_down_event - - - -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_scroll_up_event - - - -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_wheel_event - - - -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.break_when - - - - classmethod - - - -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.dt_tick - - - -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.update - - - -
    update() -> None
    -
    - -
    - -

    Update the sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_joy_axis_motion_event - - - -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_joy_button_down_event - - - -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_joy_button_up_event - - - -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_joy_hat_motion_event - - - -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_joy_ball_motion_event - - - -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_enter_event - - - -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_exit_event - - - -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_drag_down_event - - - -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_left_mouse_drag_down_event - - - -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_left_mouse_drag_up_event - - - -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_middle_mouse_drag_down_event - - - -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_middle_mouse_drag_up_event - - - -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_right_mouse_drag_down_event - - - -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_right_mouse_drag_up_event - - - -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_drag_up_event - - - -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_chord_up_event - - - -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_mouse_chord_down_event - - - -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_key_down_event - - - -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_key_up_event - - - -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_key_chord_down_event - - - -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_key_chord_up_event - - - -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_quit_event - - - -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_active_event - - - -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_video_resize_event - - - -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_video_expose_event - - - -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_sys_wm_event - - - -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_user_event - - - -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.__str__ - - - -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.load - - - -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.inflate - - - - classmethod - - - -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.save - - - -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.deflate - - - -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.__init__ - - - -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a SliderKnobSprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the slider knob sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the slider knob sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the slider knob sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the slider knob sprite.

      -
      -
    • -
    • - name - (str, default: - None -) - – -
      -

      The name of the slider knob sprite.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      The parent object.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_left_mouse_button_down_event - - - -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - - - glitchygames.ui.SliderSprite.SliderKnobSprite.on_left_mouse_drag_event - - - -
    on_left_mouse_drag_event(event: Event, trigger: object) -> None
    -
    - -
    - -

    Handle left mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    -
    Functions
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_drag_event - - -
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_drop_event - - -
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_left_mouse_drop_event - - -
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_middle_mouse_drag_event - - -
    -
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_middle_mouse_drop_event - - -
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_right_mouse_drag_event - - -
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_right_mouse_drop_event - - -
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drop event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_focus_event - - -
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    -
    - -
    - -

    Handle a mouse focus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_unfocus_event - - -
    -
    on_mouse_unfocus_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse unfocus event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_button_up_event - - -
    -
    on_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_left_mouse_button_up_event - - -
    -
    on_left_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a left mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_middle_mouse_button_up_event - - -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_right_mouse_button_up_event - - -
    -
    on_right_mouse_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_button_down_event - - -
    -
    on_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_middle_mouse_button_down_event - - -
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a middle mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_right_mouse_button_down_event - - -
    -
    on_right_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a right mouse button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_scroll_down_event - - -
    -
    on_mouse_scroll_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_scroll_up_event - - -
    -
    on_mouse_scroll_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse scroll up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_wheel_event - - -
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse wheel event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_joy_axis_motion_event - - -
    -
    on_joy_axis_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick axis motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_joy_button_up_event - - -
    -
    on_joy_button_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_joy_hat_motion_event - - -
    -
    on_joy_hat_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick hat motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_joy_ball_motion_event - - -
    -
    on_joy_ball_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick ball motion event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_enter_event - - -
    -
    on_mouse_enter_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse enter event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_exit_event - - -
    -
    on_mouse_exit_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse exit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_drag_down_event - - -
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_left_mouse_drag_down_event - - -
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_left_mouse_drag_up_event - - -
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a left mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_middle_mouse_drag_down_event - - -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_middle_mouse_drag_up_event - - -
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a middle mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_right_mouse_drag_down_event - - -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_right_mouse_drag_up_event - - -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    -
    - -
    - -

    Handle a right mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_drag_up_event - - -
    -
    on_mouse_drag_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse drag up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_chord_up_event - - -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_mouse_chord_down_event - - -
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a mouse chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_key_down_event - - -
    -
    on_key_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a key down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_key_up_event - - -
    -
    on_key_up_event(event: Event) -> None
    -
    - -
    - -

    Handle a key up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_key_chord_down_event - - -
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord down event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_key_chord_up_event - - -
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    -
    - -
    - -

    Handle a key chord up event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_quit_event - - -
    -
    on_quit_event(event: Event) -> None
    -
    - -
    - -

    Handle a quit event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_active_event - - -
    -
    on_active_event(event: Event) -> None
    -
    - -
    - -

    Handle an active event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_video_resize_event - - -
    -
    on_video_resize_event(event: Event) -> None
    -
    - -
    - -

    Handle a video resize event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_video_expose_event - - -
    -
    on_video_expose_event(event: Event) -> None
    -
    - -
    - -

    Handle a video expose event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_sys_wm_event - - -
    -
    on_sys_wm_event(event: Event) -> None
    -
    - -
    - -

    Handle a sys wm event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_user_event - - -
    -
    on_user_event(event: Event) -> None
    -
    - -
    - -

    Handle a user event.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.load - - -
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    -
    - -
    - -

    Load a sprite from a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.inflate - - - - classmethod - - -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    -
    - -
    - -

    Inflate a sprite from a list of pixels.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.save - - -
    -
    save(filename: str) -> None
    -
    - -
    - -

    Save a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.deflate - - -
    -
    deflate() -> dict
    -
    - -
    - -

    Deflate a sprite to a Bitmappy config file.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.__init__ - - -
    -
    __init__(
    -    x: int,
    -    y: int,
    -    width: int,
    -    height: int,
    -    name: str | None = None,
    -    parent: object | None = None,
    -    groups: LayeredDirty | None = None,
    -) -> None
    -
    - -
    - -

    Initialize a SliderSprite.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - x - (int) - – -
      -

      The x coordinate of the slider sprite.

      -
      -
    • -
    • - y - (int) - – -
      -

      The y coordinate of the slider sprite.

      -
      -
    • -
    • - width - (int) - – -
      -

      The width of the slider sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      The height of the slider sprite.

      -
      -
    • -
    • - name - (str, default: - None -) - – -
      -

      The name of the slider sprite.

      -
      -
    • -
    • - parent - (object, default: - None -) - – -
      -

      The parent object.

      -
      -
    • -
    • - groups - (LayeredDirty | None, default: - None -) - – -
      -

      The sprite groups to add the sprite to.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.update_nested_sprites - - -
    -
    update_nested_sprites() -> None
    -
    - -
    - -

    Update the nested sprites.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.update - - -
    -
    update() -> None
    -
    - -
    - -

    Update the slider sprite.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_left_mouse_button_down_event - - -
    -
    on_left_mouse_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle left mouse button down events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.SliderSprite.on_left_mouse_drag_event - - -
    -
    on_left_mouse_drag_event(event: Event, trigger: object) -> None
    -
    - -
    - -

    Handle left mouse drag events.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - -

    - glitchygames.ui.ColorWellSprite - - -

    - - -
    -

    - Bases: BitmappySprite

    - - -

    A color well sprite class.

    - - - - -
    - - - - - -
    Attributes
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.rect - - - - instance-attribute - - -
    -
    rect = get_rect()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.image - - - - instance-attribute - - -
    -
    image = Surface((width, height))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.USE_GFXDRAW - - - - class-attribute - instance-attribute - - -
    -
    USE_GFXDRAW: ClassVar = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.PROXIES - - - - class-attribute - instance-attribute - - -
    -
    PROXIES: ClassVar = [sprite]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.SPRITE_BREAKPOINTS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_BREAKPOINTS: ClassVar = None
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.SPRITE_COUNTERS - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.SPRITE_COUNT - - - - class-attribute - instance-attribute - - -
    -
    SPRITE_COUNT = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.dt - - - - instance-attribute - - -
    -
    dt = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.dt_timer - - - - instance-attribute - - -
    -
    dt_timer = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.name - - - - instance-attribute - - -
    -
    name = name
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.parent - - - - instance-attribute - - -
    -
    parent = parent
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.proxies - - - - instance-attribute - - -
    -
    proxies = [parent]
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.callbacks - - - - instance-attribute - - -
    -
    callbacks = {}
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.screen - - - - instance-attribute - - -
    -
    screen = get_surface()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.screen_width - - - - instance-attribute - - -
    -
    screen_width = get_width()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.screen_height - - - - instance-attribute - - -
    -
    screen_height = get_height()
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.width - - - - instance-attribute - - -
    -
    width = width
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.height - - - - instance-attribute - - -
    -
    height = height
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.DEBUG - - - - class-attribute - instance-attribute - - -
    -
    DEBUG = False
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.DEFAULT_SURFACE_W - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_W = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.DEFAULT_SURFACE_H - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE_H = 42
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.DEFAULT_SURFACE - - - - class-attribute - instance-attribute - - -
    -
    DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.filename - - - - instance-attribute - - -
    -
    filename = filename
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.focusable - - - - instance-attribute - - -
    -
    focusable = focusable
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.log - - - - class-attribute - instance-attribute - - -
    -
    log = LOG
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.red - - - - instance-attribute - - -
    -
    red = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.green - - - - instance-attribute - - -
    -
    green = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.blue - - - - instance-attribute - - -
    -
    blue = 0
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.text_sprite - - - - instance-attribute - - -
    -
    text_sprite = TextBoxSprite(
    -    x=midleft[0] + width,
    -    y=centery - 10,
    -    width=100,
    -    height=20,
    -    name=str(active_color),
    -    parent=self,
    -    groups=groups,
    -)
    -
    - -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.active_color - - - - property - writable - - -
    -
    active_color: tuple[int, int, int]
    -
    - -
    - -

    Get the active color.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[int, int, int] - – -
      -

      tuple[R: int, G: int, B: int]: The active color.

      -
      -
    • -
    -
    - -
    - -
    - - - -
    - glitchygames.ui.ColorWellSprite.hex_color - - - - property - - -
    -
    hex_color: str
    -
    - -
    - -

    Get the hex color.

    - - - - - - - - - - - - - - -
    Returns: -
      -
    • -str( str -) – -
      -

      The hex color in #RRGGBB format.

      -
      -
    • -
    -
    - -
    - -
    Functions
    - - -
    - - - -
    - glitchygames.ui.ColorWellSprite.__subclasshook__ - - - - classmethod - - -
    -
    __subclasshook__(subclass: object) -> bool
    -
    - -
    - -

    Override the default subclasshook to create an interface.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.ColorWellSprite.on_mouse_motion_event - - -
    -
    on_mouse_motion_event(event: Event) -> None
    -
    - -
    - -

    Handle a mouse motion event.

    - - - - - - - - - - - - @@ -70948,17 +9255,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_drop_event +
    + glitchygames.ui.Sprite.on_sys_wm_event
    -
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_sys_wm_event(event: Event) -> None
     
    -

    Handle a mouse drop event.

    +

    Handle a sys wm event.

    @@ -70980,14 +9287,6 @@
    -

    The object that triggered the event.

    -
    - @@ -71026,17 +9325,17 @@
    - glitchygames.ui.ColorWellSprite.on_left_mouse_drag_event +
    + glitchygames.ui.Sprite.on_user_event
    -
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_user_event(event: Event) -> None
     
    -

    Handle a left mouse drag event.

    +

    Handle a user event.

    @@ -71058,14 +9357,6 @@
    -

    The object that triggered the event.

    -
    - @@ -71104,17 +9395,17 @@
    - glitchygames.ui.ColorWellSprite.on_left_mouse_drop_event +
    + glitchygames.ui.Sprite.on_left_mouse_drag_event
    -
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a left mouse drop event.

    +

    Handle a left mouse drag event.

    @@ -71182,8 +9473,8 @@
    - glitchygames.ui.ColorWellSprite.on_middle_mouse_drag_event +
    + glitchygames.ui.Sprite.on_middle_mouse_drag_event
    @@ -71260,17 +9551,17 @@
    - glitchygames.ui.ColorWellSprite.on_middle_mouse_drop_event +
    + glitchygames.ui.Sprite.on_right_mouse_drag_event
    -
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a middle mouse drop event.

    +

    Handle a right mouse drag event.

    @@ -71338,17 +9629,17 @@
    - glitchygames.ui.ColorWellSprite.on_right_mouse_drag_event +
    + glitchygames.ui.Sprite.on_left_mouse_drop_event
    -
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a right mouse drag event.

    +

    Handle a left mouse drop event.

    @@ -71416,17 +9707,17 @@
    - glitchygames.ui.ColorWellSprite.on_right_mouse_drop_event +
    + glitchygames.ui.Sprite.on_middle_mouse_drop_event
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a right mouse drop event.

    +

    Handle a middle mouse drop event.

    @@ -71494,17 +9785,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_focus_event +
    + glitchygames.ui.Sprite.on_right_mouse_drop_event
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    +
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse focus event.

    +

    Handle a right mouse drop event.

    @@ -71527,11 +9818,11 @@
    -

    The old focus.

    +

    The object that triggered the event.

    @@ -71572,17 +9863,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_unfocus_event +
    + glitchygames.ui.Sprite.on_mouse_drag_event
    -
    on_mouse_unfocus_event(event: Event) -> None
    +
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse unfocus event.

    +

    Handle a mouse drag event.

    @@ -71604,6 +9895,14 @@
    +

    The object that triggered the event.

    +
    + @@ -71642,17 +9941,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_button_up_event +
    + glitchygames.ui.Sprite.on_mouse_drop_event
    -
    on_mouse_button_up_event(event: Event) -> None
    +
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a mouse button up event.

    +

    Handle a mouse drop event.

    @@ -71674,6 +9973,14 @@
    +

    The object that triggered the event.

    +
    + @@ -71712,17 +10019,17 @@
    - glitchygames.ui.ColorWellSprite.on_left_mouse_button_up_event +
    + glitchygames.ui.Sprite.on_mouse_wheel_event
    -
    on_left_mouse_button_up_event(event: Event) -> None
    +
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
     
    -

    Handle a left mouse button up event.

    +

    Handle a mouse wheel event.

    @@ -71744,6 +10051,14 @@
    +

    The object that triggered the event.

    +
    + @@ -71782,17 +10097,317 @@
    - glitchygames.ui.ColorWellSprite.on_middle_mouse_button_up_event +
    + glitchygames.ui.Sprite.__str__
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    __str__() -> str
     
    -

    Handle a middle mouse button up event.

    +

    Returns a string representation of the sprite.

    + +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.ui.MenuBar + + +

    + + +
    +

    + Bases: FocusableSingletonBitmappySprite

    + + +

    A menu bar class.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.ui.MenuBar.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.all_sprites + + + + instance-attribute + + +
    +
    all_sprites = groups
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.background_color + + + + instance-attribute + + +
    +
    background_color = (0, 255, 0)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.border_width + + + + instance-attribute + + +
    +
    border_width = 2
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.menu_items + + + + instance-attribute + + +
    +
    menu_items = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.menu_offset_x + + + + instance-attribute + + +
    +
    menu_offset_x = border_width
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.menu_offset_y + + + + instance-attribute + + +
    +
    menu_offset_y = border_width
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.width + + + + instance-attribute + + +
    +
    width = width
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.height + + + + instance-attribute + + +
    +
    height = height
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.has_focus + + + + instance-attribute + + +
    +
    has_focus = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuBar.dirty + + + + instance-attribute + + +
    +
    dirty = 2
    +
    + +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.ui.MenuBar.__init__ + + +
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
    +
    + +
    + +

    Initialize a MenuBar.

    @@ -71807,11 +10422,55 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the menu bar.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the menu bar.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the menu bar.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the menu bar.

      +
      +
    • +
    • + name + (str | None, default: + None +) + – +
      +

      The name of the menu bar.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -71852,17 +10511,17 @@
    - glitchygames.ui.ColorWellSprite.on_right_mouse_button_up_event +
    + glitchygames.ui.MenuBar.add_menu
    -
    on_right_mouse_button_up_event(event: Event) -> None
    +
    add_menu(menu: MenuItem) -> None
     
    -

    Handle a right mouse button up event.

    +

    Add a menu to the menu bar.

    @@ -71877,11 +10536,11 @@
    • - event - (Event) + menu + (MenuItem) –
      -

      The event to handle.

      +

      The menu to add.

    @@ -71922,17 +10581,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_button_down_event +
    + glitchygames.ui.MenuBar.add_menu_item
    -
    on_mouse_button_down_event(event: Event) -> None
    +
    add_menu_item(menu_item: MenuItem, menu: MenuBar | None = None) -> None
     
    -

    Handle a mouse button down event.

    +

    Add a menu item to the menu bar.

    @@ -71947,11 +10606,21 @@
    • - event - (Event) + menu_item + (MenuItem) –
      -

      The event to handle.

      +

      The menu item to add.

      +
      +
    • +
    • + menu + (MenuBar | None, default: + None +) + – +
      +

      The menu to add the menu item to.

    @@ -71992,43 +10661,18 @@
    - glitchygames.ui.ColorWellSprite.on_left_mouse_button_down_event +
    + glitchygames.ui.MenuBar.update
    -
    on_left_mouse_button_down_event(event: Event) -> None
    +
    update() -> None
     
    -

    Handle a left mouse button down event.

    - - +

    Update the menu bar.

    -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      +

      The event to handle.

    @@ -70870,17 +9185,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_drag_event +
    + glitchygames.ui.Sprite.on_video_expose_event
    -
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    on_video_expose_event(event: Event) -> None
     
    -

    Handle a mouse drag event.

    +

    Handle a video expose event.

    @@ -70902,14 +9217,6 @@
    -

    The object that triggered the event.

    -
    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -72062,17 +10706,17 @@
    - glitchygames.ui.ColorWellSprite.on_middle_mouse_button_down_event +
    + glitchygames.ui.MenuBar.on_left_mouse_drag_event
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    on_left_mouse_drag_event(event: Event, trigger: object) -> None
     
    -

    Handle a middle mouse button down event.

    +

    Handle left mouse drag events.

    @@ -72094,6 +10738,14 @@
    The event to handle.

    +
  • + trigger + (object) + – +
    +

    The object that triggered the event.

    +
    +
  • @@ -72132,17 +10784,17 @@
    - glitchygames.ui.ColorWellSprite.on_right_mouse_button_down_event +
    + glitchygames.ui.MenuBar.on_left_mouse_drop_event
    -
    on_right_mouse_button_down_event(event: Event) -> None
    +
    on_left_mouse_drop_event(event: Event) -> None
     
    -

    Handle a right mouse button down event.

    +

    Handle left mouse drop events.

    @@ -72202,17 +10854,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_scroll_down_event +
    + glitchygames.ui.MenuBar.on_middle_mouse_drag_event
    -
    on_mouse_scroll_down_event(event: Event) -> None
    +
    on_middle_mouse_drag_event(event: Event) -> None
     
    -

    Handle a mouse scroll down event.

    +

    Handle middle mouse drag events.

    @@ -72272,17 +10924,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_scroll_up_event +
    + glitchygames.ui.MenuBar.on_middle_mouse_drop_event
    -
    on_mouse_scroll_up_event(event: Event) -> None
    +
    on_middle_mouse_drop_event(event: Event) -> None
     
    -

    Handle a mouse scroll up event.

    +

    Handle middle mouse drop events.

    @@ -72342,17 +10994,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_wheel_event +
    + glitchygames.ui.MenuBar.on_mouse_drag_event
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_drag_event(event: Event, trigger: object) -> None
     
    -

    Handle a mouse wheel event.

    +

    Handle mouse drag events.

    @@ -72376,7 +11028,7 @@

    The object that triggered the event.

    @@ -72420,163 +11072,17 @@
    - glitchygames.ui.ColorWellSprite.break_when - - - - classmethod - - -
    -
    break_when(sprite_type: object | None = None) -> None
    -
    - -
    - -

    Register a breakpoint for a sprite type.

    - - - -
    - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ColorWellSprite.dt_tick - - -
    -
    dt_tick(dt: float) -> None
    -
    - -
    - -

    Update the sprite's delta time.

    - - - - - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    - - - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    - -
    - - -
    - - - -
    - glitchygames.ui.ColorWellSprite.on_joy_axis_motion_event +
    + glitchygames.ui.MenuBar.on_mouse_drop_event
    -
    on_joy_axis_motion_event(event: Event) -> None
    +
    on_mouse_drop_event(event: Event, trigger: object) -> None
     
    -

    Handle a joystick axis motion event.

    +

    Handle mouse drop events.

    @@ -72598,74 +11104,12 @@
    - - - - - - - Returns: - -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    - - - - -
    - -
    - - -
    - - - -
    - glitchygames.ui.ColorWellSprite.on_joy_button_down_event - - -
    -
    on_joy_button_down_event(event: Event) -> None
    -
    - -
    - -

    Handle a joystick button down event.

    - - - - - - - - - - - - @@ -73134,17 +11570,17 @@
    - glitchygames.ui.ColorWellSprite.on_left_mouse_drag_down_event +
    + glitchygames.ui.MenuBar.on_right_mouse_drop_event
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    on_right_mouse_drop_event(event: Event) -> None
     
    -

    Handle a left mouse drag down event.

    +

    Handle right mouse drop events.

    @@ -73166,14 +11602,6 @@
    -

    The object that triggered the event.

    -
    - @@ -73212,17 +11640,17 @@
    - glitchygames.ui.ColorWellSprite.on_left_mouse_drag_up_event +
    + glitchygames.ui.MenuBar.on_mouse_wheel_event
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    on_mouse_wheel_event(event: Event) -> None
     
    -

    Handle a left mouse drag up event.

    +

    Handle mouse wheel events.

    @@ -73244,14 +11672,6 @@
    -

    The object that triggered the event.

    -
    - @@ -73286,21 +11706,32 @@
    +
    +
    -
    - glitchygames.ui.ColorWellSprite.on_middle_mouse_drag_down_event + + +
    + + + +

    + glitchygames.ui.MenuItem + + +

    -
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    -
    +

    + Bases: BitmappySprite

    + -

    Handle a middle mouse drag down event.

    +

    A menu item class.

    +

    This class represents a menu item. It can be a root level menu item or a sub menu item.

    @@ -73315,19 +11746,11 @@
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) + BitmappySprite + (BitmappySprite) –
      -

      The object that triggered the event.

      +

      The base sprite class.

    @@ -73348,7 +11771,6 @@
    • - None

      None

      @@ -73359,456 +11781,412 @@
      + + + + + +
      Attributes
      + +
      + + + +
      + glitchygames.ui.MenuItem.log + + + + class-attribute + instance-attribute + + +
      +
      log = LOG
      +
      + +
      +
      -
      +
      + glitchygames.ui.MenuItem.all_sprites + + + + instance-attribute + + +
      +
      all_sprites = groups
      +
      + +
      +
      + +
      + +
      -
      - glitchygames.ui.ColorWellSprite.on_middle_mouse_drag_up_event +
      + glitchygames.ui.MenuItem.background_color + + + + instance-attribute + +
      -
      on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
      +
      background_color = (255, 0, 255)
       
      +
      + +
      + +
      + + + +
      + glitchygames.ui.MenuItem.border_width + -

      Handle a middle mouse drag up event.

      + + instance-attribute + +
      +
      border_width = 2
      +
      +
      +
      -
    Parameters: -
    • - event - (Event) + trigger + (object) –
      -

      The event to handle.

      +

      The object that triggered the event.

    @@ -72706,17 +11150,17 @@
    - glitchygames.ui.ColorWellSprite.on_joy_button_up_event +
    + glitchygames.ui.MenuBar.on_mouse_motion_event
    -
    on_joy_button_up_event(event: Event) -> None
    +
    on_mouse_motion_event(event: Event) -> None
     
    -

    Handle a joystick button up event.

    +

    Handle mouse motion events.

    @@ -72776,17 +11220,17 @@
    - glitchygames.ui.ColorWellSprite.on_joy_hat_motion_event +
    + glitchygames.ui.MenuBar.on_mouse_enter_event
    -
    on_joy_hat_motion_event(event: Event) -> None
    +
    on_mouse_enter_event(event: Event) -> None
     
    -

    Handle a joystick hat motion event.

    +

    Handle mouse enter events.

    @@ -72846,17 +11290,17 @@
    - glitchygames.ui.ColorWellSprite.on_joy_ball_motion_event +
    + glitchygames.ui.MenuBar.on_mouse_exit_event
    -
    on_joy_ball_motion_event(event: Event) -> None
    +
    on_mouse_exit_event(event: Event) -> None
     
    -

    Handle a joystick ball motion event.

    +

    Handle mouse exit events.

    @@ -72916,17 +11360,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_enter_event +
    + glitchygames.ui.MenuBar.on_left_mouse_button_down_event
    -
    on_mouse_enter_event(event: Event) -> None
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a mouse enter event.

    +

    Handle left mouse button down events.

    @@ -72986,17 +11430,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_exit_event +
    + glitchygames.ui.MenuBar.on_left_mouse_button_up_event
    -
    on_mouse_exit_event(event: Event) -> None
    +
    on_left_mouse_button_up_event(event: Event) -> None
     
    -

    Handle a mouse exit event.

    +

    Handle left mouse button up events.

    @@ -73056,17 +11500,17 @@
    - glitchygames.ui.ColorWellSprite.on_mouse_drag_down_event +
    + glitchygames.ui.MenuBar.on_right_mouse_drag_event
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    on_right_mouse_drag_event(event: Event) -> None
     
    -

    Handle a mouse drag down event.

    +

    Handle right mouse drag events.

    @@ -73088,14 +11532,6 @@
    -

    The object that triggered the event.

    -
    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    +
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + +
    + glitchygames.ui.MenuItem.menu_items + + + + instance-attribute + + +
    +
    menu_items = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuItem.menu_offset_x + + + + instance-attribute + + +
    +
    menu_offset_x = border_width
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.MenuItem.menu_offset_y + + + + instance-attribute + + +
    +
    menu_offset_y = border_width
    +
    + +
    - -
    +
    -
    - glitchygames.ui.ColorWellSprite.on_right_mouse_drag_down_event +
    + glitchygames.ui.MenuItem.menu_image + + + instance-attribute +
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    menu_image = None
     
    - -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    +
    +
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + +
    + glitchygames.ui.MenuItem.menu_rect + + + + instance-attribute + + +
    +
    menu_rect = None
    +
    + +
    - -
    +
    -
    - glitchygames.ui.ColorWellSprite.on_right_mouse_drag_up_event +
    + glitchygames.ui.MenuItem.active + + + instance-attribute +
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    active = False
     
    - -

    Handle a right mouse drag up event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.ui.MenuItem.name + + + + instance-attribute + + +
    +
    name = name
    +
    + +
    - -
    +
    -
    - glitchygames.ui.ColorWellSprite.on_mouse_drag_up_event +
    + glitchygames.ui.MenuItem.parent + + + instance-attribute +
    -
    on_mouse_drag_up_event(event: Event) -> None
    +
    parent = parent
     
    - -

    Handle a mouse drag up event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.ui.MenuItem.text + + + + instance-attribute + + +
    +
    text = TextSprite(
    +    background_color=background_color,
    +    text_color=(0, 0, 0),
    +    x=x,
    +    y=y,
    +    width=width,
    +    height=height,
    +    text=name,
    +    parent=parent,
    +    groups=groups,
    +)
    +
    + +
    - -
    +
    -
    - glitchygames.ui.ColorWellSprite.on_mouse_chord_up_event +
    + glitchygames.ui.MenuItem.menu_up_image + + + instance-attribute +
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    +
    menu_up_image = image
     
    - -

    Handle a mouse chord up event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.ui.MenuItem.menu_up_rect + + + + instance-attribute + + +
    +
    menu_up_rect = rect
    +
    + +
    - -
    +
    -
    - glitchygames.ui.ColorWellSprite.on_mouse_chord_down_event +
    + glitchygames.ui.MenuItem.menu_down_image + + + instance-attribute +
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    +
    menu_down_image = menu_up_image
     
    - -

    Handle a mouse chord down event.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.ui.MenuItem.menu_down_rect + + + + instance-attribute + + +
    +
    menu_down_rect = menu_up_rect
    +
    + +
    +
    Functions
    +
    -
    - glitchygames.ui.ColorWellSprite.on_key_down_event +
    + glitchygames.ui.MenuItem.__init__
    -
    on_key_down_event(event: Event) -> None
    +
    __init__(
    +    x: int = 0,
    +    y: int = 0,
    +    width: int = 1,
    +    height: int = 1,
    +    name: str | None = None,
    +    filename: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a key down event.

    +

    Initialize a MenuItem.

    @@ -73823,11 +12201,83 @@
    • - event - (Event) + x + (int, default: + 0 +) –
      -

      The event to handle.

      +

      The x coordinate of the menu item.

      +
      +
    • +
    • + y + (int, default: + 0 +) + – +
      +

      The y coordinate of the menu item.

      +
      +
    • +
    • + width + (int, default: + 1 +) + – +
      +

      The width of the menu item.

      +
      +
    • +
    • + height + (int, default: + 1 +) + – +
      +

      The height of the menu item.

      +
      +
    • +
    • + name + (str | None, default: + None +) + – +
      +

      The name of the menu item.

      +
      +
    • +
    • + filename + (str | None, default: + None +) + – +
      +

      The filename of the menu item.

      +
      +
    • +
    • + parent + (object | None, default: + None +) + – +
      +

      The parent of the menu item.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -73868,17 +12318,17 @@
    - glitchygames.ui.ColorWellSprite.on_key_up_event +
    + glitchygames.ui.MenuItem.add
    -
    on_key_up_event(event: Event) -> None
    +
    add(*groups: LayeredDirty) -> None
     
    -

    Handle a key up event.

    +

    Add the sprite to a group.

    @@ -73893,11 +12343,13 @@
    • - event - (Event) + *groups + (LayeredDirty, default: + () +) –
      -

      The event to handle.

      +

      The groups to add the sprite to.

    @@ -73938,17 +12390,17 @@
    - glitchygames.ui.ColorWellSprite.on_key_chord_down_event +
    + glitchygames.ui.MenuItem.add_menu
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    +
    add_menu(menu: MenuItem) -> None
     
    -

    Handle a key chord down event.

    +

    Add a menu to the menu item.

    @@ -73963,19 +12415,11 @@
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) + menu + (MenuItem) –
      -

      The keys that were pressed.

      +

      The menu to add.

    @@ -74016,17 +12460,17 @@
    - glitchygames.ui.ColorWellSprite.on_key_chord_up_event +
    + glitchygames.ui.MenuItem.add_menu_item
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    +
    add_menu_item(menu_item: MenuItem, menu: MenuBar) -> None
     
    -

    Handle a key chord up event.

    +

    Add a menu item to the menu item.

    @@ -74041,19 +12485,19 @@
    • - event - (Event) + menu_item + (MenuItem) –
      -

      The event to handle.

      +

      The menu item to add.

    • - keys - (list) + menu + (MenuBar) –
      -

      The keys that were pressed.

      +

      The menu to add the menu item to.

    @@ -74094,17 +12538,62 @@
    - glitchygames.ui.ColorWellSprite.on_quit_event +
    + glitchygames.ui.MenuItem.update
    -
    on_quit_event(event: Event) -> None
    +
    update() -> None
     
    -

    Handle a quit event.

    +

    Update the menu item.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.ui.MenuItem.on_left_mouse_drag_event + + +
    +
    on_left_mouse_drag_event(event: Event) -> None
    +
    + +
    + +

    Handle left mouse drag events.

    @@ -74164,17 +12653,17 @@
    -
    - glitchygames.ui.ColorWellSprite.on_active_event +
    + glitchygames.ui.MenuItem.on_left_mouse_drop_event
    -
    on_active_event(event: Event) -> None
    +
    on_left_mouse_drop_event(event: Event) -> None
     
    -

    Handle an active event.

    +

    Handle left mouse drop events.

    @@ -74234,17 +12723,17 @@
    - glitchygames.ui.ColorWellSprite.on_video_resize_event +
    + glitchygames.ui.MenuItem.on_middle_mouse_drag_event
    -
    on_video_resize_event(event: Event) -> None
    +
    on_middle_mouse_drag_event(event: Event) -> None
     
    -

    Handle a video resize event.

    +

    Handle middle mouse drag events.

    @@ -74304,17 +12793,17 @@
    - glitchygames.ui.ColorWellSprite.on_video_expose_event +
    + glitchygames.ui.MenuItem.on_middle_mouse_drop_event
    -
    on_video_expose_event(event: Event) -> None
    +
    on_middle_mouse_drop_event(event: Event) -> None
     
    -

    Handle a video expose event.

    +

    Handle middle mouse drop events.

    @@ -74374,17 +12863,17 @@
    - glitchygames.ui.ColorWellSprite.on_sys_wm_event +
    + glitchygames.ui.MenuItem.on_mouse_drag_event
    -
    on_sys_wm_event(event: Event) -> None
    +
    on_mouse_drag_event(event: Event) -> None
     
    -

    Handle a sys wm event.

    +

    Handle mouse drag events.

    @@ -74444,17 +12933,17 @@
    - glitchygames.ui.ColorWellSprite.on_user_event +
    + glitchygames.ui.MenuItem.on_mouse_drop_event
    -
    on_user_event(event: Event) -> None
    +
    on_mouse_drop_event(event: Event) -> None
     
    -

    Handle a user event.

    +

    Handle mouse drop events.

    @@ -74514,38 +13003,17 @@
    -
    - glitchygames.ui.ColorWellSprite.__str__ - - -
    -
    __str__() -> str
    -
    - -
    - -

    Returns a string representation of the sprite.

    - -
    - -
    - - -
    - - - -
    - glitchygames.ui.ColorWellSprite.load +
    + glitchygames.ui.MenuItem.on_mouse_motion_event
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    +
    on_mouse_motion_event(event: Event) -> None
     
    -

    Load a sprite from a Bitmappy config file.

    +

    Handle mouse motion events.

    @@ -74560,11 +13028,11 @@
    • - filename - (str) + event + (Event) –
      -

      the filename of the Bitmappy config file.

      +

      The event to handle.

    @@ -74585,10 +13053,10 @@
    • - tuple[Surface, Rect, str] + None
      -

      A tuple containing the sprite's image, rect, and name.

      +

      None

    @@ -74596,6 +13064,27 @@
    +
    + +
    + + +
    + + + +
    + glitchygames.ui.MenuItem.on_mouse_enter_event + + +
    +
    on_mouse_enter_event(event: Event) -> None
    +
    + +
    + +

    Handle mouse enter events.

    + @@ -74605,21 +13094,15 @@
    - +
    Raises:Parameters:
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError + event + (Event) –
      -

      if the config file is missing an option.

      +

      The event to handle.

    @@ -74627,6 +13110,30 @@
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    @@ -74636,64 +13143,36 @@
    -
    - glitchygames.ui.ColorWellSprite.inflate +
    + glitchygames.ui.MenuItem.on_mouse_exit_event - - - classmethod -
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    +
    on_mouse_exit_event(event: Event) -> None
     
    -

    Inflate a sprite from a list of pixels.

    +

    Handle mouse exit events.

    - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • + + + + + + + + +
      Parameters: +
      • - color_map - (dict) + event + (Event) –
        -

        the color map.

        +

        The event to handle.

      @@ -74714,10 +13193,10 @@
      • - tuple[Surface, Rect] + None
        -

        A tuple containing the sprite's image and rect.

        +

        None

      @@ -74734,17 +13213,17 @@
      -
      - glitchygames.ui.ColorWellSprite.save +
      + glitchygames.ui.MenuItem.on_left_mouse_button_up_event
      -
      save(filename: str) -> None
      +
      on_left_mouse_button_up_event(event: Event) -> None
       
      -

      Save a sprite to a Bitmappy config file.

      +

      Handle left mouse button up events.

      @@ -74759,11 +13238,11 @@
      • - filename - (str) + event + (Event) –
        -

        the filename of the Bitmappy config file.

        +

        The event to handle.

      @@ -74804,18 +13283,43 @@
      -
      - glitchygames.ui.ColorWellSprite.deflate +
      + glitchygames.ui.MenuItem.on_left_mouse_button_down_event
      -
      deflate() -> dict
      +
      on_left_mouse_button_down_event(event: Event) -> None
       
      -

      Deflate a sprite to a Bitmappy config file.

      +

      Handle left mouse button down events.

      + + + + + + + + + + + + + +
      Parameters: +
        +
      • + event + (Event) + – +
        +

        The event to handle.

        +
        +
      • +
      +
      @@ -74829,10 +13333,10 @@
      - - + +
      • - dict + None
        -

        A dict containing the sprite's config.

        +

        None

      @@ -74849,25 +13353,17 @@
      -
      - glitchygames.ui.ColorWellSprite.__init__ +
      + glitchygames.ui.MenuItem.on_right_mouse_drag_event
      -
      __init__(
      -    x: int,
      -    y: int,
      -    width: int,
      -    height: int,
      -    name: str,
      -    parent: object | None = None,
      -    groups: LayeredDirty | None = None,
      -) -> None
      +
      on_right_mouse_drag_event(event: Event) -> None
       
      -

      Initialize a ColorWellSprite.

      +

      Handle right mouse drag events.

      @@ -74882,63 +13378,11 @@
      • - x - (int) - – -
        -

        The x coordinate of the color well sprite.

        -
        -
      • -
      • - y - (int) - – -
        -

        The y coordinate of the color well sprite.

        -
        -
      • -
      • - width - (int) - – -
        -

        The width of the color well sprite.

        -
        -
      • -
      • - height - (int) - – -
        -

        The height of the color well sprite.

        -
        -
      • -
      • - name - (str) - – -
        -

        The name of the color well sprite.

        -
        -
      • -
      • - parent - (object, default: - None -) - – -
        -

        The parent object.

        -
        -
      • -
      • - groups - (LayeredDirty | None, default: - None -) + event + (Event) –
        -

        The sprite groups to add the sprite to.

        +

        The event to handle.

      @@ -74979,19 +13423,44 @@
      -
      - glitchygames.ui.ColorWellSprite.update_nested_sprites +
      + glitchygames.ui.MenuItem.on_right_mouse_drop_event
      -
      update_nested_sprites() -> None
      +
      on_right_mouse_drop_event(event: Event) -> None
       
      -

      Update the nested sprites.

      +

      Handle right mouse drop events.

      + + + + + + + + + + + + +
      Parameters: +
        +
      • + event + (Event) + – +
        +

        The event to handle.

        +
        +
      • +
      +
      + @@ -75024,18 +13493,43 @@
      - glitchygames.ui.ColorWellSprite.update +
      + glitchygames.ui.MenuItem.on_mouse_wheel_event
      -
      update() -> None
      +
      on_mouse_wheel_event(event: Event) -> None
       
      -

      Update the color well sprite.

      +

      Handle mouse wheel events.

      + + +
      + + + + + + + + + + +
      Parameters: +
        +
      • + event + (Event) + – +
        +

        The event to handle.

        +
        +
      • +
      +
      @@ -75077,8 +13571,8 @@
      -

      - glitchygames.ui.InputDialog +

      + glitchygames.ui.TextSprite

      @@ -75089,7 +13583,7 @@

      Bases: BitmappySprite

      -

      An input dialog class.

      +

      A text sprite class.

      @@ -75100,22 +13594,23 @@

      -

      Attributes
      +
      Attributes
      -
      - glitchygames.ui.InputDialog.rect +
      + glitchygames.ui.TextSprite.log + class-attribute instance-attribute
      -
      rect = get_rect()
      +
      log = LOG
       
      @@ -75127,8 +13622,8 @@
      -
      - glitchygames.ui.InputDialog.image +
      + glitchygames.ui.TextSprite.background_color @@ -75136,7 +13631,198 @@
      -
      image = Surface((width, height))
      +
      background_color = (255, 0, 255)
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.active_color + + + + instance-attribute + + +
      +
      active_color = background_color
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.click_color + + + + instance-attribute + + +
      +
      click_color = (0, 255, 128)
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.hover_color + + + + instance-attribute + + +
      +
      hover_color = (255, 255, 0)
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.text + + + + instance-attribute + + +
      +
      text = text
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.font_manager + + + + instance-attribute + + +
      +
      font_manager = FontManager(GameEngine)
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.alpha + + + + instance-attribute + + +
      +
      alpha = 0
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.parent + + + + instance-attribute + + +
      +
      parent = parent
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.text_box + + + + instance-attribute + + +
      +
      text_box = TextBox(
      +    font=font(), x=x, y=x, text=text, text_color=text_color, parent=self, groups=groups
      +)
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.proxies + + + + instance-attribute + + +
      +
      proxies = [parent]
       
      @@ -75144,56 +13830,138 @@
      -
      +
      + + + +
      + glitchygames.ui.TextSprite.x + + + + property + writable + + +
      +
      x: int
      +
      + +
      + +

      Get the x coordinate of the text sprite.

      + + + +
      + + + + + + + + + + +
      Returns: +
        +
      • +int( int +) – +
        +

        The x coordinate of the text sprite.

        +
        +
      • +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.TextSprite.y + + + + property + writable + + +
      +
      y: int
      +
      + +
      + +

      Get the y coordinate of the text sprite.

      + + + + + + + + + + + + + + +
      Returns: +
        +
      • +int( int +) – +
        +

        The y coordinate of the text sprite.

        +
        +
      • +
      +
      + +
      +
      Classes
      + +
      -
      - glitchygames.ui.InputDialog.USE_GFXDRAW +
      + glitchygames.ui.TextSprite.TextBox - - - class-attribute - instance-attribute -
      -
      USE_GFXDRAW: ClassVar = False
      -
      +
      -
      +

      + Bases: Sprite

      -
      + +

      A text box class.

      -
      + +
      -
      - glitchygames.ui.InputDialog.PROXIES - - - class-attribute - instance-attribute - -
      -
      PROXIES: ClassVar = [sprite]
      -
      -
      -
      -
      +Attributes
      -
      - glitchygames.ui.InputDialog.SPRITE_BREAKPOINTS + + glitchygames.ui.TextSprite.TextBox.log @@ -75201,8 +13969,8 @@
      instance-attribute -
      -
      SPRITE_BREAKPOINTS: ClassVar = None
      +
      +
      log = LOG
       
      @@ -75214,17 +13982,16 @@
      -
      - glitchygames.ui.InputDialog.SPRITE_COUNTERS + + glitchygames.ui.TextSprite.TextBox.start_x - class-attribute instance-attribute -
      -
      SPRITE_COUNTERS: ClassVar = OrderedDict()
      +
      +
      start_x = x
       
      @@ -75236,17 +14003,16 @@
      -
      - glitchygames.ui.InputDialog.SPRITE_COUNT + + glitchygames.ui.TextSprite.TextBox.start_y - class-attribute instance-attribute -
      -
      SPRITE_COUNT = 0
      +
      +
      start_y = y
       
      @@ -75258,16 +14024,16 @@
      -
      - glitchygames.ui.InputDialog.dt + + glitchygames.ui.TextSprite.TextBox.line_height instance-attribute -
      -
      dt = 0
      +
      +
      line_height = line_height
       
      @@ -75279,16 +14045,16 @@
      -
      - glitchygames.ui.InputDialog.dt_timer + + glitchygames.ui.TextSprite.TextBox.text_color instance-attribute -
      -
      dt_timer = 0
      +
      +
      text_color = text_color
       
      @@ -75300,16 +14066,16 @@
      -
      - glitchygames.ui.InputDialog.name + + glitchygames.ui.TextSprite.TextBox.text_hover_color instance-attribute -
      -
      name = name
      +
      +
      text_hover_color = (255, 255, 255)
       
      @@ -75321,16 +14087,16 @@
      -
      - glitchygames.ui.InputDialog.parent + + glitchygames.ui.TextSprite.TextBox.text_click_color instance-attribute -
      -
      parent = parent
      +
      +
      text_click_color = (63, 127, 255)
       
      @@ -75342,16 +14108,16 @@
      -
      - glitchygames.ui.InputDialog.proxies + + glitchygames.ui.TextSprite.TextBox.background_color instance-attribute -
      -
      proxies = [parent]
      +
      +
      background_color = (255, 0, 255)
       
      @@ -75363,16 +14129,16 @@
      -
      - glitchygames.ui.InputDialog.callbacks + + glitchygames.ui.TextSprite.TextBox.background_hover_color instance-attribute -
      -
      callbacks = {}
      +
      +
      background_hover_color = (0, 255, 128)
       
      @@ -75384,16 +14150,16 @@
      -
      - glitchygames.ui.InputDialog.screen + + glitchygames.ui.TextSprite.TextBox.background_click_color instance-attribute -
      -
      screen = get_surface()
      +
      +
      background_click_color = (255, 127, 63)
       
      @@ -75405,16 +14171,16 @@
      -
      - glitchygames.ui.InputDialog.screen_width + + glitchygames.ui.TextSprite.TextBox.active_text_color instance-attribute -
      -
      screen_width = get_width()
      +
      +
      active_text_color = text_color
       
      @@ -75426,16 +14192,16 @@
      -
      - glitchygames.ui.InputDialog.screen_height + + glitchygames.ui.TextSprite.TextBox.active_background_color instance-attribute -
      -
      screen_height = get_height()
      +
      +
      active_background_color = background_color
       
      @@ -75447,16 +14213,16 @@
      -
      - glitchygames.ui.InputDialog.height + + glitchygames.ui.TextSprite.TextBox.font instance-attribute -
      -
      height = height
      +
      +
      font = font
       
      @@ -75468,17 +14234,16 @@
      -
      - glitchygames.ui.InputDialog.DEBUG + + glitchygames.ui.TextSprite.TextBox.name - class-attribute instance-attribute -
      -
      DEBUG = False
      +
      +
      name = text
       
      @@ -75490,17 +14255,16 @@
      -
      - glitchygames.ui.InputDialog.DEFAULT_SURFACE_W + + glitchygames.ui.TextSprite.TextBox.parent - class-attribute instance-attribute -
      -
      DEFAULT_SURFACE_W = 42
      +
      +
      parent = parent
       
      @@ -75512,17 +14276,16 @@
      -
      - glitchygames.ui.InputDialog.DEFAULT_SURFACE_H + + glitchygames.ui.TextSprite.TextBox.proxies - class-attribute instance-attribute -
      -
      DEFAULT_SURFACE_H = 42
      +
      +
      proxies = [parent]
       
      @@ -75534,21 +14297,47 @@
      -
      - glitchygames.ui.InputDialog.DEFAULT_SURFACE + + glitchygames.ui.TextSprite.TextBox.x - class-attribute - instance-attribute + property + writable -
      -
      DEFAULT_SURFACE = Surface((DEFAULT_SURFACE_W, DEFAULT_SURFACE_H))
      +
      +
      x: int
       
      -
      + +

      Get the x coordinate of the text box.

      + + + + + + + + + + + + + + +
      Returns: +
        +
      • +int( int +) – +
        +

        The x coordinate of the text box.

        +
        +
      • +
      +
      @@ -75556,240 +14345,592 @@
      -
      - glitchygames.ui.InputDialog.filename + + glitchygames.ui.TextSprite.TextBox.y - instance-attribute + property + writable -
      -
      filename = filename
      +
      +
      y: int
       
      -
      - -
      - -
      - + +

      Get the y coordinate of the text box.

      -
      - glitchygames.ui.InputDialog.focusable - - - instance-attribute - + + + + + + + + + + + +
      Returns: +
        +
      • +int( int +) – +
        +

        The y coordinate of the text box.

        +
        +
      • +
      +
      -
      -
      focusable = focusable
      -
      +
      -
      -
      +Functions -
      -
      +
      -
      - glitchygames.ui.InputDialog.log + + glitchygames.ui.TextSprite.TextBox.__init__ - - - class-attribute - instance-attribute - -
      -
      log = LOG
      +
      +
      __init__(
      +    font: str,
      +    x: int,
      +    y: int,
      +    line_height: int = 15,
      +    text: str = "Text",
      +    text_color: tuple = WHITE,
      +    parent: object = None,
      +    groups: LayeredDirty | None = None,
      +) -> None
       
      -
      - -
      - -
      - + +

      Initialize a TextBox.

      -
      - glitchygames.ui.InputDialog.background_color - - - instance-attribute - + + + + + + + + + + + +
      Parameters: +
        +
      • + font + (str) + – +
        +

        The font to use.

        +
        +
      • +
      • + x + (int) + – +
        +

        The x coordinate of the text box.

        +
        +
      • +
      • + y + (int) + – +
        +

        The y coordinate of the text box.

        +
        +
      • +
      • + line_height + (int, default: + 15 +) + – +
        +

        The line height of the text box.

        +
        +
      • +
      • + text + (str, default: + 'Text' +) + – +
        +

        The text to display in the text box.

        +
        +
      • +
      • + text_color + (tuple, default: + WHITE +) + – +
        +

        The color of the text.

        +
        +
      • +
      • + parent + (object, default: + None +) + – +
        +

        The parent object.

        +
        +
      • +
      • + groups + (LayeredDirty | None, default: + None +) + – +
        +

        The sprite groups to add the sprite to.

        +
        +
      • +
      +
      -
      -
      background_color = (0, 0, 0)
      -
      -
      + + + + + + + + + + + +
      Returns: +
        +
      • + None + – +
        +

        None

        +
        +
      • +
      +
      -
      +
      -
      - glitchygames.ui.InputDialog.border_width - - - instance-attribute - + + glitchygames.ui.TextSprite.TextBox.print_text -
      -
      border_width = 1
      +
      +
      +
      print_text(surface: Surface, string: str) -> None
       
      -
      - -
      - -
      - + +

      Print text to the text box.

      -
      - glitchygames.ui.InputDialog.width - - - instance-attribute - + + + + + + + + + + + +
      Parameters: +
        +
      • + surface + (Surface) + – +
        +

        The surface to print the text to.

        +
        +
      • +
      • + string + (str) + – +
        +

        The text to print.

        +
        +
      • +
      +
      -
      -
      width = width
      -
      -
      + + + + + + + + + + + +
      Returns: +
        +
      • + None + – +
        +

        None

        +
        +
      • +
      +
      -
      + +
      -
      - glitchygames.ui.InputDialog.dialog_text_sprite + + glitchygames.ui.TextSprite.TextBox.reset - - - instance-attribute - -
      -
      dialog_text_sprite = TextBoxSprite(
      -    name=dialog_text, x=x, y=y, width=width // 2, height=20, parent=self, groups=groups
      -)
      +
      +
      reset() -> None
       
      + +

      Reset the text box.

      + + + + + + + + + + + + + + +
      Returns: +
        +
      • + None + – +
        +

        None

        +
        +
      • +
      +
      -
      +
      + + + + + glitchygames.ui.TextSprite.TextBox.indent -
      - glitchygames.ui.InputDialog.confirm_button + +
      indent() -> None
      +
      +
      - - instance-attribute - +

      Indent the text box.

      -
      -
      confirm_button = ButtonSprite(name=confirm_text, x=x, y=y, width=75, height=20, groups=groups)
      -
      -
      + + + + + + + + + + + + +
      Returns: +
        +
      • + None + – +
        +

        None

        +
        +
      • +
      +
      -
      +
      -
      - glitchygames.ui.InputDialog.cancel_button - - - instance-attribute - + + glitchygames.ui.TextSprite.TextBox.unindent -
      -
      cancel_button = ButtonSprite(name=cancel_text, x=x, y=y, width=75, height=20, groups=groups)
      +
      +
      +
      unindent() -> None
       
      -
      + +

      Unindent the text box.

      -
      -
      + + + + + + + + + + + +
      Returns: +
        +
      • + None + – +
        +

        None

        +
        +
      • +
      +
      +
      +
      -
      - glitchygames.ui.InputDialog.input_box - - - instance-attribute - -
      -
      input_box = InputBox(
      -    x=x + width // 2, y=y + height // 2, width=200, height=20, text="", parent=self, groups=groups
      -)
      -
      +
      -
      -
      -
      Functions
      +
      +
      Functions
      -
      - glitchygames.ui.InputDialog.__subclasshook__ +
      + glitchygames.ui.TextSprite.__init__ - - - classmethod -
      -
      __subclasshook__(subclass: object) -> bool
      +
      __init__(
      +    x: int,
      +    y: int,
      +    width: int,
      +    height: int,
      +    name: str | None = None,
      +    background_color: tuple = BLACKLUCENT,
      +    text_color: tuple = WHITE,
      +    alpha: int = 0,
      +    text: str = "Text",
      +    parent: object | None = None,
      +    groups: LayeredDirty | None = None,
      +) -> None
       
      -

      Override the default subclasshook to create an interface.

      +

      Initialize a TextSprite.

      + + + + + + + + + + + + + + +
      Parameters: +
        +
      • + x + (int) + – +
        +

        The x coordinate of the text sprite.

        +
        +
      • +
      • + y + (int) + – +
        +

        The y coordinate of the text sprite.

        +
        +
      • +
      • + width + (int) + – +
        +

        The width of the text sprite.

        +
        +
      • +
      • + height + (int) + – +
        +

        The height of the text sprite.

        +
        +
      • +
      • + name + (str, default: + None +) + – +
        +

        The name of the text sprite.

        +
        +
      • +
      • + background_color + (tuple, default: + BLACKLUCENT +) + – +
        +

        The background color of the text sprite.

        +
        +
      • +
      • + text_color + (tuple, default: + WHITE +) + – +
        +

        The color of the text.

        +
        +
      • +
      • + alpha + (int, default: + 0 +) + – +
        +

        The alpha value of the text sprite.

        +
        +
      • +
      • + text + (str, default: + 'Text' +) + – +
        +

        The text to display in the text sprite.

        +
        +
      • +
      • + parent + (object, default: + None +) + – +
        +

        The parent object.

        +
        +
      • +
      • + groups + (LayeredDirty | None, default: + None +) + – +
        +

        The sprite groups to add the sprite to.

        +
        +
      • +
      +
      + + + + + + + + + + + + +
      Returns: +
        +
      • + None + – +
        +

        None

        +
        +
      • +
      +
      @@ -75799,17 +14940,17 @@
      -
      - glitchygames.ui.InputDialog.on_mouse_motion_event +
      + glitchygames.ui.TextSprite.update_nested_sprites
      -
      on_mouse_motion_event(event: Event) -> None
      +
      update_nested_sprites() -> None
       
      -

      Handle a mouse motion event.

      +

      Update the nested sprites.

      @@ -75820,22 +14961,42 @@
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      -
      Returns: +
        +
      • + None + – +
        +

        None

        +
        +
      • +
      +
      +
      + +
      + + +
      + + + +
      + glitchygames.ui.TextSprite.update + + +
      +
      update() -> None
      +
      + +
      + +

      Update the text sprite.

      + @@ -75869,17 +15030,17 @@
      - glitchygames.ui.InputDialog.on_mouse_drag_event +
      + glitchygames.ui.TextSprite.add
      -
      on_mouse_drag_event(event: Event, trigger: object | None) -> None
      +
      add(*groups: LayeredDirty) -> None
       
      -

      Handle a mouse drag event.

      +

      Add the sprite to a group.

      @@ -75894,19 +15055,13 @@
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object | None) + *groups + (LayeredDirty, default: + () +) –
        -

        The object that triggered the event.

        +

        The groups to add the sprite to.

      @@ -75947,17 +15102,17 @@
      - glitchygames.ui.InputDialog.on_mouse_drop_event +
      + glitchygames.ui.TextSprite.on_mouse_focus_event
      -
      on_mouse_drop_event(event: Event, trigger: object | None) -> None
      +
      on_mouse_focus_event(event: Event, focus: object) -> None
       
      -

      Handle a mouse drop event.

      +

      Handle mouse focus events.

      @@ -75980,11 +15135,11 @@
    • - trigger - (object | None) + focus + (object) –
      -

      The object that triggered the event.

      +

      The object that has focus.

    • @@ -76025,17 +15180,17 @@
      - glitchygames.ui.InputDialog.on_left_mouse_drag_event +
      + glitchygames.ui.TextSprite.on_mouse_unfocus_event
      -
      on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
      +
      on_mouse_unfocus_event(event: Event) -> None
       
      -

      Handle a left mouse drag event.

      +

      Handle mouse unfocus events.

      @@ -76057,14 +15212,6 @@
      -

      The object that triggered the event.

      -
      - @@ -76103,17 +15250,17 @@
      - glitchygames.ui.InputDialog.on_left_mouse_drop_event +
      + glitchygames.ui.TextSprite.on_left_mouse_button_down_event
      -
      on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
      +
      on_left_mouse_button_down_event(event: Event) -> None
       
      -

      Handle a left mouse drop event.

      +

      Handle left mouse button down events.

      @@ -76135,14 +15282,6 @@
      -

      The object that triggered the event.

      -
      - @@ -76181,17 +15320,17 @@
      - glitchygames.ui.InputDialog.on_middle_mouse_drag_event +
      + glitchygames.ui.TextSprite.on_left_mouse_button_up_event
      -
      on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
      +
      on_left_mouse_button_up_event(event: Event) -> None
       
      -

      Handle a middle mouse drag event.

      +

      Handle left mouse button up events.

      @@ -76213,14 +15352,6 @@
      -

      The object that triggered the event.

      -
      - @@ -76255,55 +15386,200 @@
      +
      + +
      + + +
      + +
      + + + +

      + glitchygames.ui.ButtonSprite + + +

      + + +
      +

      + Bases: BitmappySprite

      + + +

      A button sprite class.

      + + + + +
      + + + + + +
      Attributes
      + +
      + + + +
      + glitchygames.ui.ButtonSprite.log + + + + class-attribute + instance-attribute + + +
      +
      log = LOG
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.ButtonSprite.border_color + + + + instance-attribute + + +
      +
      border_color = (255, 255, 255)
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.ButtonSprite.active_color + + + + instance-attribute + + +
      +
      active_color = (128, 128, 128)
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.ButtonSprite.inactive_color + + + + instance-attribute + + +
      +
      inactive_color = (0, 0, 0)
      +
      + +
      +
      + +
      + +
      + + + +
      + glitchygames.ui.ButtonSprite.background_color + + + + instance-attribute + + +
      +
      background_color = inactive_color
      +
      + +
      +
      + +
      + +
      -
      - glitchygames.ui.InputDialog.on_middle_mouse_drop_event +
      + glitchygames.ui.ButtonSprite.text + + + + instance-attribute +
      -
      on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
      +
      text = TextSprite(
      +    background_color=background_color,
      +    x=centerx if parent else x,
      +    y=centery if parent else y,
      +    width=width,
      +    height=height,
      +    text=name,
      +    parent=self,
      +    groups=groups,
      +)
       
      +
      + +
      + +
      + + + +
      + glitchygames.ui.ButtonSprite.x + -

      Handle a middle mouse drop event.

      + + property + writable + +
      +
      x: int
      +
      +
      + +

      Get the x coordinate of the button sprite.

      -
      - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object | None) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      @@ -76317,71 +15593,41 @@
      • - None - – +int( int +) –
        -

        None

        +

        The x coordinate of the button sprite.

      -
      -
      +
      - -
      +
      -
      - glitchygames.ui.InputDialog.on_right_mouse_drag_event +
      + glitchygames.ui.ButtonSprite.y + + + property + writable +
      -
      on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
      +
      y: int
       
      -

      Handle a right mouse drag event.

      - - +

      Get the y coordinate of the button sprite.

      - - - - - - - - - - - -
      Parameters: -
        -
      • - event - (Event) - – -
        -

        The event to handle.

        -
        -
      • -
      • - trigger - (object | None) - – -
        -

        The object that triggered the event.

        -
        -
      • -
      -
      @@ -76395,37 +15641,46 @@
      • - None - – +int( int +) –
        -

        None

        +

        The y coordinate of the button sprite.

      -
      -
      +
    +
    Functions
    +
    -
    - glitchygames.ui.InputDialog.on_right_mouse_drop_event +
    + glitchygames.ui.ButtonSprite.__init__
    -
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a right mouse drop event.

    +

    Initialize a ButtonSprite.

    @@ -76440,19 +15695,65 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the button sprite.

    • - trigger - (object | None) + y + (int) –
      -

      The object that triggered the event.

      +

      The y coordinate of the button sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the button sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the button sprite.

      +
      +
    • +
    • + name + (str, default: + None +) + – +
      +

      The name of the button sprite.

      +
      +
    • +
    • + parent + (object, default: + None +) + – +
      +

      The parent object.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -76493,51 +15794,19 @@
    - glitchygames.ui.InputDialog.on_mouse_focus_event +
    + glitchygames.ui.ButtonSprite.update_nested_sprites
    -
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    +
    update_nested_sprites() -> None
     
    -

    Handle a mouse focus event.

    - - +

    Update the nested sprites.

    +

    Sets the dirty flag on the nested sprites.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - old_focus - (object) - – -
      -

      The old focus.

      -
      -
    • -
    -
    @@ -76571,17 +15840,17 @@
    - glitchygames.ui.InputDialog.on_mouse_unfocus_event +
    + glitchygames.ui.ButtonSprite.on_left_mouse_button_down_event
    -
    on_mouse_unfocus_event(event: Event) -> None
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a mouse unfocus event.

    +

    Handle left mouse button down events.

    @@ -76641,8 +15910,8 @@
    - glitchygames.ui.InputDialog.on_left_mouse_button_up_event +
    + glitchygames.ui.ButtonSprite.on_left_mouse_button_up_event
    @@ -76651,7 +15920,7 @@
    -

    Handle a left mouse button up event.

    +

    Handle left mouse button up events.

    @@ -76707,161 +15976,133 @@
    +
    +
    -
    - glitchygames.ui.InputDialog.on_middle_mouse_button_up_event + + +
    + + + +

    + glitchygames.ui.CheckboxSprite + + +

    -
    -
    on_middle_mouse_button_up_event(event: Event) -> None
    -
    +

    + Bases: ButtonSprite

    + -

    Handle a middle mouse button up event.

    +

    A checkbox sprite class.

    + -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    -
    -
    -
    +
    Attributes
    + +
    -
    - glitchygames.ui.InputDialog.on_right_mouse_button_up_event +
    + glitchygames.ui.CheckboxSprite.log + + + class-attribute + instance-attribute +
    -
    on_right_mouse_button_up_event(event: Event) -> None
    +
    log = LOG
     
    +
    + +
    + +
    + + + +
    + glitchygames.ui.CheckboxSprite.checked + -

    Handle a right mouse button up event.

    + + instance-attribute + + +
    +
    checked = False
    +
    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + +
    + glitchygames.ui.CheckboxSprite.color + + + + instance-attribute + + +
    +
    color = (128, 128, 128)
    +
    + +
    +
    Functions
    +
    -
    - glitchygames.ui.InputDialog.on_mouse_button_down_event +
    + glitchygames.ui.CheckboxSprite.__init__
    -
    on_mouse_button_down_event(event: Event) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    callbacks: Callable | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a mouse button down event.

    +

    Initialize a CheckboxSprite.

    @@ -76876,11 +16117,65 @@
    • - event - (Event) + x + (int) + – +
      +

      The x coordinate of the checkbox sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the checkbox sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the checkbox sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the checkbox sprite.

      +
      +
    • +
    • + name + (str, default: + None +) + – +
      +

      The name of the checkbox sprite.

      +
      +
    • +
    • + callbacks + (Callable, default: + None +) + – +
      +

      The callbacks to call when events occur.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) –
      -

      The event to handle.

      +

      The sprite groups to add the sprite to.

    @@ -76921,43 +16216,18 @@
    - glitchygames.ui.InputDialog.on_left_mouse_button_down_event +
    + glitchygames.ui.CheckboxSprite.update
    -
    on_left_mouse_button_down_event(event: Event) -> None
    +
    update() -> None
     
    -

    Handle a left mouse button down event.

    - - +

    Update the checkbox sprite.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -76991,17 +16261,17 @@
    - glitchygames.ui.InputDialog.on_middle_mouse_button_down_event +
    + glitchygames.ui.CheckboxSprite.on_left_mouse_button_down_event
    -
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a middle mouse button down event.

    +

    Handle left mouse button down events.

    @@ -77061,17 +16331,17 @@
    - glitchygames.ui.InputDialog.on_right_mouse_button_down_event +
    + glitchygames.ui.CheckboxSprite.on_left_mouse_button_up_event
    -
    on_right_mouse_button_down_event(event: Event) -> None
    +
    on_left_mouse_button_up_event(event: Event) -> None
     
    -

    Handle a right mouse button down event.

    +

    Handle left mouse button up events.

    @@ -77127,161 +16397,344 @@
    + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.ui.InputBox + + +

    + + +
    +

    + Bases: Sprite

    + + +

    An input box class.

    + + + + +
    + + -
    - glitchygames.ui.InputDialog.on_mouse_scroll_down_event +
    Attributes
    + +
    + + + +
    + glitchygames.ui.InputBox.offset_x + + + instance-attribute +
    -
    on_mouse_scroll_down_event(event: Event) -> None
    +
    offset_x = x if parent else 0
     
    +
    + +
    + +
    + + + +
    + glitchygames.ui.InputBox.offset_y + -

    Handle a mouse scroll down event.

    + + instance-attribute + +
    +
    offset_y = y if parent else 0
    +
    +
    +
    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + +
    + glitchygames.ui.InputBox.rect + + + + instance-attribute + + +
    +
    rect = Rect(x, y, width, height)
    +
    + +
    +
    -
    + + +
    + glitchygames.ui.InputBox.color + + + + instance-attribute + + +
    +
    color = color
    +
    + +
    +
    + +
    + +
    -
    - glitchygames.ui.InputDialog.on_mouse_scroll_up_event +
    + glitchygames.ui.InputBox.font + + + instance-attribute +
    -
    on_mouse_scroll_up_event(event: Event) -> None
    +
    font = SysFont('Times', 14)
     
    +
    + +
    + +
    + + + +
    + glitchygames.ui.InputBox.text + -

    Handle a mouse scroll up event.

    + + instance-attribute + +
    +
    text = text
    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    +
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    + + +
    + glitchygames.ui.InputBox.text_image + + + + instance-attribute + + +
    +
    text_image = render(text, True, color)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.InputBox.active + + + + instance-attribute + + +
    +
    active = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.InputBox.image + + + + instance-attribute + + +
    +
    image = Surface((width, height))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.InputBox.parent + + + + instance-attribute + + +
    +
    parent = parent
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.InputBox.cursor_rect + + + + instance-attribute + + +
    +
    cursor_rect = get_rect()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.InputBox.cursor + + + + instance-attribute + + +
    +
    cursor = Rect(topright, (3, height))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.InputBox.dirty + + + + instance-attribute + + +
    +
    dirty = 2
    +
    + +
    +
    Functions
    +
    -
    - glitchygames.ui.InputDialog.on_mouse_wheel_event +
    + glitchygames.ui.InputBox.__init__
    -
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    color: tuple = (233, 248, 215),
    +    text: str = "",
    +    name: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a mouse wheel event.

    +

    Initialize an InputBox.

    @@ -77296,19 +16749,85 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the input box.

    • - trigger - (object | None) + y + (int) + – +
      +

      The y coordinate of the input box.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the input box.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the input box.

      +
      +
    • +
    • + color + (tuple, default: + (233, 248, 215) +) + – +
      +

      The color of the input box.

      +
      +
    • +
    • + text + (str, default: + '' +) + – +
      +

      The text to display in the input box.

      +
      +
    • +
    • + name + (str, default: + None +) + – +
      +

      The name of the input box.

      +
      +
    • +
    • + parent + (object, default: + None +) + – +
      +

      The parent object.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) –
      -

      The object that triggered the event.

      +

      The sprite groups to add the sprite to.

    @@ -77349,49 +16868,18 @@
    - glitchygames.ui.InputDialog.break_when +
    + glitchygames.ui.InputBox.activate - - - classmethod -
    -
    break_when(sprite_type: object | None = None) -> None
    +
    activate() -> None
     
    -

    Register a breakpoint for a sprite type.

    - - +

    Activate the input box.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - sprite_type - (object | None, default: - None -) - – -
      -

      The sprite type to break on.

      -
      -
    • -
    -
    @@ -77425,43 +16913,18 @@
    -
    - glitchygames.ui.InputDialog.dt_tick +
    + glitchygames.ui.InputBox.deactivate
    -
    dt_tick(dt: float) -> None
    +
    deactivate() -> None
     
    -

    Update the sprite's delta time.

    - - +

    Deactivate the input box.

    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - dt - (float) - – -
      -

      The new delta time.

      -
      -
    • -
    -
    @@ -77495,17 +16958,17 @@
    -
    - glitchygames.ui.InputDialog.on_joy_axis_motion_event +
    + glitchygames.ui.InputBox.on_input_box_submit_event
    -
    on_joy_axis_motion_event(event: Event) -> None
    +
    on_input_box_submit_event(event: Event) -> None
     
    -

    Handle a joystick axis motion event.

    +

    Handle input box submit events.

    @@ -77565,43 +17028,18 @@
    - glitchygames.ui.InputDialog.on_joy_button_down_event +
    + glitchygames.ui.InputBox.update
    -
    on_joy_button_down_event(event: Event) -> None
    +
    update() -> None
     
    -

    Handle a joystick button down event.

    - - +

    Update the input box.

    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -77635,43 +17073,18 @@
    - glitchygames.ui.InputDialog.on_joy_button_up_event +
    + glitchygames.ui.InputBox.render
    -
    on_joy_button_up_event(event: Event) -> None
    +
    render() -> None
     
    -

    Handle a joystick button up event.

    - - +

    Render the input box.

    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -77705,17 +17118,17 @@
    - glitchygames.ui.InputDialog.on_joy_hat_motion_event +
    + glitchygames.ui.InputBox.on_mouse_up_event
    -
    on_joy_hat_motion_event(event: Event) -> None
    +
    on_mouse_up_event(event: Event) -> None
     
    -

    Handle a joystick hat motion event.

    +

    Handle mouse up events.

    @@ -77775,17 +17188,17 @@
    - glitchygames.ui.InputDialog.on_joy_ball_motion_event +
    + glitchygames.ui.InputBox.on_key_up_event
    -
    on_joy_ball_motion_event(event: Event) -> None
    +
    on_key_up_event(event: Event) -> None
     
    -

    Handle a joystick ball motion event.

    +

    Handle key up events.

    @@ -77845,17 +17258,17 @@
    - glitchygames.ui.InputDialog.on_mouse_enter_event +
    + glitchygames.ui.InputBox.on_key_down_event
    -
    on_mouse_enter_event(event: Event) -> None
    +
    on_key_down_event(event: Event) -> None
     
    -

    Handle a mouse enter event.

    +

    Handle key down events.

    @@ -77911,21 +17324,269 @@
    + + + +

    + glitchygames.ui.TextBoxSprite + + +

    + + +
    +

    + Bases: BitmappySprite

    + + +

    A text box sprite class.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.value + + + + instance-attribute + + +
    +
    value = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.background_color + + + + instance-attribute + + +
    +
    background_color = (0, 0, 0)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.border_width + + + + instance-attribute + + +
    +
    border_width = 1
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.callbacks + + + + instance-attribute + + +
    +
    callbacks = callbacks
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.text_box + + + + instance-attribute + + +
    +
    text_box = TextSprite(
    +    background_color=background_color,
    +    x=x,
    +    y=y,
    +    width=width - border_width,
    +    height=height - border_width,
    +    text=value,
    +    parent=self,
    +    groups=groups,
    +)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.x + + + + instance-attribute + + +
    +
    x = x
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.y + + + + instance-attribute + + +
    +
    y = y
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.TextBoxSprite.proxies + + + + instance-attribute + + +
    +
    proxies = [parent]
    +
    + +
    +
    + +
    + +
    Functions
    + +
    -
    - glitchygames.ui.InputDialog.on_mouse_exit_event +
    + glitchygames.ui.TextBoxSprite.__init__
    -
    on_mouse_exit_event(event: Event) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    callbacks: Callable | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a mouse exit event.

    +

    Initialize a TextBoxSprite.

    @@ -77940,11 +17601,75 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the text box sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the text box sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the text box sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the text box sprite.

      +
      +
    • +
    • + name + (str, default: + None +) + – +
      +

      The name of the text box sprite.

      +
      +
    • +
    • + callbacks + (Callable, default: + None +) + – +
      +

      The callbacks to call when events occur.

      +
      +
    • +
    • + parent + (object, default: + None +) + – +
      +

      The parent object.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -77985,51 +17710,63 @@
    - glitchygames.ui.InputDialog.on_mouse_drag_down_event +
    + glitchygames.ui.TextBoxSprite.update_nested_sprites + + +
    +
    update_nested_sprites() -> None
    +
    + +
    + +

    Update the nested sprites.

    + + + +
    + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.ui.TextBoxSprite.update
    -
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    update() -> None
     
    -

    Handle a mouse drag down event.

    - - +

    Update the text box sprite.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    @@ -78063,17 +17800,17 @@
    - glitchygames.ui.InputDialog.on_left_mouse_drag_down_event +
    + glitchygames.ui.TextBoxSprite.on_left_mouse_button_down_event
    -
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a left mouse drag down event.

    +

    Handle left mouse button down events.

    @@ -78095,14 +17832,6 @@
    -

    The object that triggered the event.

    -
    - @@ -78141,17 +17870,17 @@
    - glitchygames.ui.InputDialog.on_left_mouse_drag_up_event +
    + glitchygames.ui.TextBoxSprite.on_left_mouse_button_up_event
    -
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    on_left_mouse_button_up_event(event: Event) -> None
     
    -

    Handle a left mouse drag up event.

    +

    Handle left mouse button up events.

    @@ -78173,14 +17902,6 @@
    -

    The object that triggered the event.

    -
    - @@ -78215,55 +17936,201 @@
    +
    + +
    + + + + +
    + + + +

    + glitchygames.ui.SliderSprite + + +

    + + +
    +

    + Bases: BitmappySprite

    + + +

    A slider sprite class.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.ui.SliderSprite.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    -
    - glitchygames.ui.InputDialog.on_middle_mouse_drag_down_event +
    + glitchygames.ui.SliderSprite.text_sprite + + + + instance-attribute +
    -
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    text_sprite = TextSprite(
    +    x=257, y=y, width=40, height=16, name=str((0, 0, 0)), parent=self, groups=groups
    +)
     
    +
    + +
    + +
    + + + +
    + glitchygames.ui.SliderSprite.slider_knob + -

    Handle a middle mouse drag down event.

    + + instance-attribute + +
    +
    slider_knob = SliderKnobSprite(
    +    x=x,
    +    y=y - 1,
    +    width=height * 2 - 1,
    +    height=height * 2 - 1,
    +    name=name,
    +    parent=self,
    +    groups=groups,
    +)
    +
    +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.SliderSprite.image + + + + instance-attribute + + +
    +
    image = Surface((width, height))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.SliderSprite.rect + + + + instance-attribute + + +
    +
    rect = get_rect()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.SliderSprite.background + + + + instance-attribute + + +
    +
    background = Surface((width, height))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.SliderSprite.value + + + + property + writable + + +
    +
    value: int
    +
    + +
    + +

    Get the value of the slider sprite.

    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    -
    @@ -78277,37 +18144,40 @@
    • - None - – +int( int +) –
      -

      None

      +

      The value of the slider sprite.

    -
    -
    +
    - -
    +
    -
    - glitchygames.ui.InputDialog.on_middle_mouse_drag_up_event +
    + glitchygames.ui.SliderSprite.x + + + property + writable +
    -
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    x: int
     
    -

    Handle a middle mouse drag up event.

    +

    Get the x coordinate of the slider sprite.

    @@ -78318,30 +18188,45 @@
    - Parameters: - -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - trigger - (object | None) - – -
      -

      The object that triggered the event.

      -
      -
    • -
    - + Returns: + +
      +
    • +int( int +) – +
      +

      The x coordinate of the slider sprite.

      +
      +
    • +
    + - +
    + +
    + +
    + + + +
    + glitchygames.ui.SliderSprite.y + + + + property + writable + + +
    +
    y: int
    +
    + +
    + +

    Get the y coordinate of the slider sprite.

    + @@ -78355,85 +18240,182 @@
    • - None - – +int( int +) –
      -

      None

      +

      The y coordinate of the slider sprite.

    -
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.ui.SliderSprite.SliderKnobSprite + + +
    + + +
    +

    + Bases: BitmappySprite

    + + +

    A slider knob sprite class.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.ui.SliderSprite.SliderKnobSprite.log + + + + class-attribute + instance-attribute + + + +
    log = LOG
    +
    + +
    +
    + -
    + + glitchygames.ui.SliderSprite.SliderKnobSprite.value + + + + instance-attribute + + + +
    value = 0
    +
    + +
    +
    + +
    +
    -
    - glitchygames.ui.InputDialog.on_right_mouse_drag_down_event -
    -
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    +          glitchygames.ui.SliderSprite.SliderKnobSprite.rect
    +
    +  
    +  
    +      instance-attribute
    +  
    +
    +
    +
    rect = Rect(x, y, width, height)
     
    +
    + +
    + +
    + + + + + glitchygames.ui.SliderSprite.SliderKnobSprite.x + -

    Handle a right mouse drag down event.

    -

    Args: -event (pygame.event.Event): The event to handle. -trigger (object | None): The object that triggered the event.

    + + instance-attribute + + +
    +
    x = x
    +
    + +
    +
    + +
    + +
    + + + + glitchygames.ui.SliderSprite.SliderKnobSprite.y + + + + instance-attribute + + +
    y = y
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    +Functions +
    -
    - glitchygames.ui.InputDialog.on_right_mouse_drag_up_event + + glitchygames.ui.SliderSprite.SliderKnobSprite.__init__ -
    -
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a right mouse drag up event.

    +

    Initialize a SliderKnobSprite.

    @@ -78448,19 +18430,65 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the slider knob sprite.

    • - trigger - (object | None) + y + (int) –
      -

      The object that triggered the event.

      +

      The y coordinate of the slider knob sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the slider knob sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the slider knob sprite.

      +
      +
    • +
    • + name + (str, default: + None +) + – +
      +

      The name of the slider knob sprite.

      +
      +
    • +
    • + parent + (object, default: + None +) + – +
      +

      The parent object.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -78501,17 +18529,17 @@
    - glitchygames.ui.InputDialog.on_mouse_drag_up_event + + glitchygames.ui.SliderSprite.SliderKnobSprite.on_left_mouse_button_down_event -
    -
    on_mouse_drag_up_event(event: Event) -> None
    +
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a mouse drag up event.

    +

    Handle left mouse button down events.

    @@ -78571,17 +18599,17 @@
    - glitchygames.ui.InputDialog.on_mouse_chord_up_event + + glitchygames.ui.SliderSprite.SliderKnobSprite.on_left_mouse_drag_event -
    -
    on_mouse_chord_up_event(event: Event, keys: list) -> None
    +
    +
    on_left_mouse_drag_event(event: Event, trigger: object) -> None
     
    -

    Handle a mouse chord up event.

    +

    Handle left mouse drag events.

    @@ -78604,11 +18632,11 @@
    -

    The keys that were pressed.

    +

    The object that triggered the event.

    @@ -78645,21 +18673,39 @@
    Functions
    + +
    -
    - glitchygames.ui.InputDialog.on_mouse_chord_down_event +
    + glitchygames.ui.SliderSprite.__init__
    -
    on_mouse_chord_down_event(event: Event, keys: list) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a mouse chord down event.

    +

    Initialize a SliderSprite.

    @@ -78674,19 +18720,65 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the slider sprite.

    • - keys - (list) + y + (int) –
      -

      The keys that were pressed.

      +

      The y coordinate of the slider sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the slider sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the slider sprite.

      +
      +
    • +
    • + name + (str, default: + None +) + – +
      +

      The name of the slider sprite.

      +
      +
    • +
    • + parent + (object, default: + None +) + – +
      +

      The parent object.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -78727,51 +18819,18 @@
    - glitchygames.ui.InputDialog.on_key_chord_down_event +
    + glitchygames.ui.SliderSprite.update_nested_sprites
    -
    on_key_chord_down_event(event: Event, keys: list) -> None
    +
    update_nested_sprites() -> None
     
    -

    Handle a key chord down event.

    - - +

    Update the nested sprites.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    @@ -78805,51 +18864,18 @@
    - glitchygames.ui.InputDialog.on_key_chord_up_event +
    + glitchygames.ui.SliderSprite.update
    -
    on_key_chord_up_event(event: Event, keys: list) -> None
    +
    update() -> None
     
    -

    Handle a key chord up event.

    - - +

    Update the slider sprite.

    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    • - keys - (list) - – -
      -

      The keys that were pressed.

      -
      -
    • -
    -
    @@ -78883,17 +18909,17 @@
    - glitchygames.ui.InputDialog.on_quit_event +
    + glitchygames.ui.SliderSprite.on_left_mouse_button_down_event
    -
    on_quit_event(event: Event) -> None
    +
    on_left_mouse_button_down_event(event: Event) -> None
     
    -

    Handle a quit event.

    +

    Handle left mouse button down events.

    @@ -78953,17 +18979,17 @@
    -
    - glitchygames.ui.InputDialog.on_active_event +
    + glitchygames.ui.SliderSprite.on_left_mouse_drag_event
    -
    on_active_event(event: Event) -> None
    +
    on_left_mouse_drag_event(event: Event, trigger: object) -> None
     
    -

    Handle an active event.

    +

    Handle left mouse drag events.

    @@ -78985,6 +19011,14 @@

    The event to handle.

    +
  • + trigger + (object) + – +
    +

    The object that triggered the event.

    +
    +
  • @@ -79019,21 +19053,177 @@
    -
    + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.ui.ColorWellSprite + + +

    + + +
    +

    + Bases: BitmappySprite

    + + +

    A color well sprite class.

    + + + + +
    + + -
    - glitchygames.ui.InputDialog.on_video_resize_event +
    Attributes
    + +
    + + + +
    + glitchygames.ui.ColorWellSprite.log + + + class-attribute + instance-attribute +
    -
    on_video_resize_event(event: Event) -> None
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.ColorWellSprite.red + + + + instance-attribute + + +
    +
    red = 0
     
    +
    + +
    + +
    + + + +
    + glitchygames.ui.ColorWellSprite.green + -

    Handle a video resize event.

    + + instance-attribute + + +
    +
    green = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.ColorWellSprite.blue + + + + instance-attribute + + +
    +
    blue = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.ColorWellSprite.text_sprite + + + + instance-attribute + + +
    +
    text_sprite = TextBoxSprite(
    +    x=midleft[0] + width,
    +    y=centery - 10,
    +    width=100,
    +    height=20,
    +    name=str(active_color),
    +    parent=self,
    +    groups=groups,
    +)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.ColorWellSprite.active_color + + + + property + writable + + +
    +
    active_color: tuple[int, int, int]
    +
    + +
    + +

    Get the active color.

    @@ -79044,22 +19234,44 @@
    - - + + -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    Returns: +
      +
    • + tuple[int, int, int] + – +
      +

      tuple[R: int, G: int, B: int]: The active color.

      +
      +
    • +
    +
    +
    + +
    + +
    + + + +
    + glitchygames.ui.ColorWellSprite.hex_color + + + + property + + +
    +
    hex_color: str
    +
    + +
    + +

    Get the hex color.

    + @@ -79073,37 +19285,46 @@
    • - None - – +str( str +) –
      -

      None

      +

      The hex color in #RRGGBB format.

    -
    -
    +
    +
    Functions
    +
    -
    - glitchygames.ui.InputDialog.on_video_expose_event +
    + glitchygames.ui.ColorWellSprite.__init__
    -
    on_video_expose_event(event: Event) -> None
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
     
    -

    Handle a video expose event.

    +

    Initialize a ColorWellSprite.

    @@ -79118,11 +19339,63 @@
    • - event - (Event) + x + (int) –
      -

      The event to handle.

      +

      The x coordinate of the color well sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the color well sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the color well sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the color well sprite.

      +
      +
    • +
    • + name + (str) + – +
      +

      The name of the color well sprite.

      +
      +
    • +
    • + parent + (object, default: + None +) + – +
      +

      The parent object.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

    @@ -79163,43 +19436,18 @@
    - glitchygames.ui.InputDialog.on_sys_wm_event +
    + glitchygames.ui.ColorWellSprite.update_nested_sprites
    -
    on_sys_wm_event(event: Event) -> None
    +
    update_nested_sprites() -> None
     
    -

    Handle a sys wm event.

    - - +

    Update the nested sprites.

    - - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -79233,43 +19481,18 @@
    -
    - glitchygames.ui.InputDialog.on_user_event +
    + glitchygames.ui.ColorWellSprite.update
    -
    on_user_event(event: Event) -> None
    +
    update() -> None
     
    -

    Handle a user event.

    - - +

    Update the color well sprite.

    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - event - (Event) - – -
      -

      The event to handle.

      -
      -
    • -
    -
    @@ -79299,340 +19522,218 @@
    -
    + +
    + + + -
    - glitchygames.ui.InputDialog.__str__ +
    -
    -
    __str__() -> str
    -
    + +

    + glitchygames.ui.InputDialog + + +

    +
    +

    + Bases: BitmappySprite

    + -

    Returns a string representation of the sprite.

    +

    An input dialog class.

    -
    - + + +
    -
    -
    - glitchygames.ui.InputDialog.load +
    Attributes
    + +
    + + + +
    + glitchygames.ui.InputDialog.log + + + class-attribute + instance-attribute +
    -
    load(filename: str) -> tuple[Surface, Rect, str]
    +
    log = LOG
     
    - -

    Load a sprite from a Bitmappy config file.

    +
    +
    +
    -
    - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect, str] - – -
      -

      A tuple containing the sprite's image, rect, and name.

      -
      -
    • -
    -
    +
    + glitchygames.ui.InputDialog.background_color + + + instance-attribute + - - - - - - - - - - - -
    Raises: -
      -
    • - NoSectionError - – -
      -

      if the config file is missing a section.

      -
      -
    • -
    • - NoOptionError - – -
      -

      if the config file is missing an option.

      -
      -
    • -
    -
    +
    +
    background_color = (0, 0, 0)
    +
    + +
    - -
    +
    -
    - glitchygames.ui.InputDialog.inflate +
    + glitchygames.ui.InputDialog.border_width - classmethod + instance-attribute
    -
    inflate(width: int, height: int, pixels: list, color_map: dict) -> tuple[Surface, Rect]
    +
    border_width = 1
     
    - -

    Inflate a sprite from a list of pixels.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - width - (int) - – -
      -

      the width of the sprite.

      -
      -
    • -
    • - height - (int) - – -
      -

      the height of the sprite.

      -
      -
    • -
    • - pixels - (list) - – -
      -

      the list of pixels.

      -
      -
    • -
    • - color_map - (dict) - – -
      -

      the color map.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - tuple[Surface, Rect] - – -
      -

      A tuple containing the sprite's image and rect.

      -
      -
    • -
    -
    +
    + glitchygames.ui.InputDialog.width + + + + instance-attribute + + +
    +
    width = width
    +
    + +
    - -
    +
    -
    - glitchygames.ui.InputDialog.save +
    + glitchygames.ui.InputDialog.dialog_text_sprite + + + instance-attribute +
    -
    save(filename: str) -> None
    +
    dialog_text_sprite = TextBoxSprite(
    +    name=dialog_text, x=x, y=y, width=width // 2, height=20, parent=self, groups=groups
    +)
     
    - -

    Save a sprite to a Bitmappy config file.

    +
    +
    +
    - - - - - - - - - - - -
    Parameters: -
      -
    • - filename - (str) - – -
      -

      the filename of the Bitmappy config file.

      -
      -
    • -
    -
    - - - - - - - - - - - -
    Returns: -
      -
    • - None - – -
      -

      None

      -
      -
    • -
    -
    +
    + glitchygames.ui.InputDialog.confirm_button + + + + instance-attribute + + +
    +
    confirm_button = ButtonSprite(name=confirm_text, x=x, y=y, width=75, height=20, groups=groups)
    +
    + +
    - -
    +
    -
    - glitchygames.ui.InputDialog.deflate +
    + glitchygames.ui.InputDialog.cancel_button + + + instance-attribute +
    -
    deflate() -> dict
    +
    cancel_button = ButtonSprite(name=cancel_text, x=x, y=y, width=75, height=20, groups=groups)
     
    - -

    Deflate a sprite to a Bitmappy config file.

    +
    +
    +
    - - - - - - - - - - - -
    Returns: -
      -
    • - dict - – -
      -

      A dict containing the sprite's config.

      -
      -
    • -
    -
    + + +
    + glitchygames.ui.InputDialog.input_box + + + + instance-attribute + + +
    +
    input_box = InputBox(
    +    x=x + width // 2, y=y + height // 2, width=200, height=20, text="", parent=self, groups=groups
    +)
    +
    + +
    +
    Functions
    +
    diff --git a/reference/index.html b/reference/index.html index b5f4526..9a92105 100644 --- a/reference/index.html +++ b/reference/index.html @@ -276,7 +276,24680 @@
    - +

    foo bar baz

    + + +
    + + + +

    + glitchygames.engine + + +

    + +
    + +

    Contains GameEngine and helper classes for building a game.

    + + + +
    + + + + + +

    Attributes

    + +
    + + + +

    + glitchygames.engine.PURPLE + + + + module-attribute + + +

    +
    PURPLE = PURPLE
    +
    + +
    +
    + +
    + +
    + + + +

    + glitchygames.engine.LOG + + + + module-attribute + + +

    +
    LOG: Logger = getLogger('game.engine')
    +
    + +
    +
    + +
    + +
    + + + +

    + glitchygames.engine.PACKAGE_PATH + + + + module-attribute + + +

    +
    PACKAGE_PATH: str = parent
    +
    + +
    +
    + +
    + +
    + + + +

    + glitchygames.engine.ASSET_PATH + + + + module-attribute + + +

    +
    ASSET_PATH: str = parent / 'assets'
    +
    + +
    +
    + +
    + +
    + + + +

    + glitchygames.engine.TEST_MODE + + + + module-attribute + + +

    +
    TEST_MODE = False
    +
    + +
    +
    + +
    +

    Classes

    + +
    + + + +

    + glitchygames.engine.HashableEvent + + +

    + + +
    +

    + Bases: dict

    + + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.HashableEvent.type + + + + instance-attribute + + +
    +
    type = type
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.HashableEvent.__hash + + + + instance-attribute + + +
    +
    __hash = hash((type, tuple(keys())))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.HashableEvent.dict + + + + property + + +
    +
    dict
    +
    + +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__init__ + + +
    +
    __init__(type, *args, **attributes)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__setitem__ + + +
    +
    __setitem__(key, item)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__getitem__ + + +
    +
    __getitem__(key)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__repr__ + + +
    +
    __repr__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__len__ + + +
    +
    __len__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__delitem__ + + +
    +
    __delitem__(key)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.clear + + +
    +
    clear()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.copy + + +
    +
    copy()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.has_key + + +
    +
    has_key(k)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.update + + +
    +
    update(*args, **kwargs)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.keys + + +
    +
    keys()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.values + + +
    +
    values()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__hash__ + + +
    +
    __hash__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__eq__ + + +
    +
    __eq__(other)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__ne__ + + +
    +
    __ne__(other)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__str__ + + +
    +
    __str__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__copy__ + + +
    +
    __copy__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__deepcopy__ + + +
    +
    __deepcopy__(memo)
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__reduce__ + + +
    +
    __reduce__()
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.HashableEvent.__setstate__ + + +
    +
    __setstate__(state)
    +
    + +
    + +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.AudioManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage pygame audio events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.AudioManager.proxies + + + + instance-attribute + + +
    +
    proxies = [AudioProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.AudioManager.AudioProxy + + +
    + + +
    +

    + Bases: AudioEvents, ResourceManager

    + + +

    Pygame audio event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, mixer]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the audio proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.on_audio_device_added_event + + + +
    on_audio_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle audio device added event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.AudioManager.AudioProxy.on_audio_device_removed_event + + + +
    on_audio_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle audio device removed event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.AudioManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the audio manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.AudioManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add arguments to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      The argument parser.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.ControllerManager + + +

    + + +
    +

    + Bases: ControllerEvents, ResourceManager

    + + +

    Manage controller events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.ControllerManager.log + + + + class-attribute + instance-attribute + + +
    +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.ControllerManager.controllers + + + + instance-attribute + + +
    +
    controllers = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.ControllerManager.proxies + + + + instance-attribute + + +
    +
    proxies = [game]
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.ControllerManager.game + + + + instance-attribute + + +
    +
    game = game
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.ControllerManager.ControllerProxy + + +
    + + +
    +

    + Bases: ControllerEvents, ResourceManager

    + + +

    Proxy class for controller events.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.log + + + + class-attribute + instance-attribute + + + +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.AXIS + + + + class-attribute + instance-attribute + + + +
    AXIS: ClassVar = [
    +    CONTROLLER_AXIS_LEFTX,
    +    CONTROLLER_AXIS_LEFTY,
    +    CONTROLLER_AXIS_RIGHTX,
    +    CONTROLLER_AXIS_RIGHTY,
    +    CONTROLLER_AXIS_TRIGGERLEFT,
    +    CONTROLLER_AXIS_TRIGGERRIGHT,
    +]
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.BUTTONS + + + + class-attribute + instance-attribute + + + +
    BUTTONS: ClassVar = [
    +    CONTROLLER_BUTTON_A,
    +    CONTROLLER_BUTTON_B,
    +    CONTROLLER_BUTTON_X,
    +    CONTROLLER_BUTTON_Y,
    +    CONTROLLER_BUTTON_DPAD_UP,
    +    CONTROLLER_BUTTON_DPAD_DOWN,
    +    CONTROLLER_BUTTON_DPAD_LEFT,
    +    CONTROLLER_BUTTON_DPAD_RIGHT,
    +    CONTROLLER_BUTTON_LEFTSHOULDER,
    +    CONTROLLER_BUTTON_RIGHTSHOULDER,
    +    CONTROLLER_BUTTON_LEFTSTICK,
    +    CONTROLLER_BUTTON_RIGHTSTICK,
    +    CONTROLLER_BUTTON_BACK,
    +    CONTROLLER_BUTTON_GUIDE,
    +    CONTROLLER_BUTTON_START,
    +]
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.controller + + + + instance-attribute + + + +
    controller = Controller(_id)
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, controller]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.__init__ + + + +
    __init__(game: object = None, controller_id: int = -1) -> None
    +
    + +
    + +

    Initialize the controller proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    • + controller_id + (int, default: + -1 +) + – +
      +

      The controller id.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_axis_motion_event + + + +
    on_controller_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle controller axis motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_button_down_event + + + +
    on_controller_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_button_up_event + + + +
    on_controller_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_added_event + + + +
    on_controller_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device added events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_remapped_event + + + +
    on_controller_device_remapped_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device remapped events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_device_removed_event + + + +
    on_controller_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device removed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_down_event + + + +
    on_controller_touchpad_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_motion_event + + + +
    on_controller_touchpad_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.on_controller_touchpad_up_event + + + +
    on_controller_touchpad_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.__str__ + + + +
    __str__() -> LiteralString
    +
    + +
    + +

    Return a string representation of the controller.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( LiteralString +) – +
      +

      A string representation of the controller.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.ControllerManager.ControllerProxy.__repr__ + + + +
    __repr__() -> str
    +
    + +
    + +

    Return a string representation of the controller object.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      A string representation of the controller object.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the ControllerManager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add controller options to the parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser: The argument parser.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_axis_motion_event + + +
    +
    on_controller_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle controller axis motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_button_down_event + + +
    +
    on_controller_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_button_up_event + + +
    +
    on_controller_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_device_added_event + + +
    +
    on_controller_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device added events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_device_remapped_event + + +
    +
    on_controller_device_remapped_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device remapped events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_device_removed_event + + +
    +
    on_controller_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle controller device removed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_down_event + + +
    +
    on_controller_touchpad_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_motion_event + + +
    +
    on_controller_touchpad_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.ControllerManager.on_controller_touchpad_up_event + + +
    +
    on_controller_touchpad_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller touchpad up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.DropManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage drop events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.DropManager.proxies + + + + instance-attribute + + +
    +
    proxies = [DropProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.DropManager.DropProxy + + +
    + + +
    +

    + Bases: DropEvents, ResourceManager

    + + +

    Proxy class for drop events.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.DropManager.DropProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.DropManager.DropProxy.proxies + + + + instance-attribute + + + +
    proxies = [game]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the drop proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.on_drop_begin_event + + + +
    on_drop_begin_event(event: Event) -> None
    +
    + +
    + +

    Handle drop begin event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.on_drop_complete_event + + + +
    on_drop_complete_event(event: Event) -> None
    +
    + +
    + +

    Handle drop complete event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.on_drop_file_event + + + +
    on_drop_file_event(event: Event) -> None
    +
    + +
    + +

    Handle drop file event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.DropManager.DropProxy.on_drop_text_event + + + +
    on_drop_text_event(event: Event) -> None
    +
    + +
    + +

    Handle drop text event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.DropManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the drop manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.DropManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add arguments to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      The argument parser.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.JoystickManager + + +

    + + +
    +

    + Bases: JoystickEvents, ResourceManager

    + + +

    Manage joystick events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.JoystickManager.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.joysticks + + + + instance-attribute + + +
    +
    joysticks = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.game + + + + instance-attribute + + +
    +
    game = game
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.JoystickManager.proxies + + + + instance-attribute + + +
    +
    proxies = [game]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.JoystickManager.JoystickProxy + + +
    + + +
    +

    + Bases: JoystickEvents, ResourceManager

    + + +

    Joystick event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.log + + + + class-attribute + instance-attribute + + + +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.joystick + + + + instance-attribute + + + +
    joystick = Joystick(_id)
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, joystick]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.__init__ + + + +
    __init__(game: object = None, joystick_id: int = -1) -> None
    +
    + +
    + +

    Initialize the joystick event proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    • + joystick_id + (int, default: + -1 +) + – +
      +

      The joystick id.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_axis_motion_event + + + +
    on_joy_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick axis motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_button_down_event + + + +
    on_joy_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_button_up_event + + + +
    on_joy_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_hat_motion_event + + + +
    on_joy_hat_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick hat motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_ball_motion_event + + + +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick ball motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_device_added_event + + + +
    on_joy_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device added events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.on_joy_device_removed_event + + + +
    on_joy_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device removed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_name + + + +
    get_name() -> str
    +
    + +
    + +

    Get the joystick name.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      The joystick name.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_init + + + +
    get_init() -> bool
    +
    + +
    + +

    Get the joystick init status.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      The joystick init status.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numaxes + + + +
    get_numaxes() -> int
    +
    + +
    + +

    Get the number of axes.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The number of axes.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numballs + + + +
    get_numballs() -> int
    +
    + +
    + +

    Get the number of trackballs.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The number of trackballs.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numbuttons + + + +
    get_numbuttons() -> int
    +
    + +
    + +

    Get the number of buttons.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The number of buttons.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.get_numhats + + + +
    get_numhats() -> int
    +
    + +
    + +

    Get the number of hats.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The number of hats.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.__str__ + + + +
    __str__() -> str
    +
    + +
    + +

    Get the joystick info.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      The joystick info.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.JoystickManager.JoystickProxy.__repr__ + + + +
    __repr__() -> str
    +
    + +
    + +

    Get the joystick representation.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +str( str +) – +
      +

      The joystick representation.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the joystick event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add joystick-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_axis_motion_event + + +
    +
    on_joy_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick axis motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_button_down_event + + +
    +
    on_joy_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_button_up_event + + +
    +
    on_joy_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_hat_motion_event + + +
    +
    on_joy_hat_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick hat motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_ball_motion_event + + +
    +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick ball motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_device_added_event + + +
    +
    on_joy_device_added_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device added events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.JoystickManager.on_joy_device_removed_event + + +
    +
    on_joy_device_removed_event(event: Event) -> None
    +
    + +
    + +

    Handle joystick device removed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.KeyboardManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage keyboard events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.KeyboardManager.proxies + + + + instance-attribute + + +
    +
    proxies = [KeyboardProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.KeyboardManager.KeyboardProxy + + +
    + + +
    +

    + Bases: KeyboardEvents, ResourceManager

    + + +

    Keyboard event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.keys + + + + instance-attribute + + + +
    keys = {}
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, key]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the keyboard event proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_down_event + + + +
    on_key_down_event(event: Event) -> None
    +
    + +
    + +

    Handle key down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_up_event + + + +
    on_key_up_event(event: Event) -> None
    +
    + +
    + +

    Handle key up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_chord_down_event + + + +
    on_key_chord_down_event(event: Event) -> None
    +
    + +
    + +

    Handle key chord down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + keys_down + (list) + – +
      +

      The keys that are currently down.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.KeyboardManager.KeyboardProxy.on_key_chord_up_event + + + +
    on_key_chord_up_event(event: Event) -> None
    +
    + +
    + +

    Handle key chord up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.KeyboardManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the keyboard event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.KeyboardManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add keyboard-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.MidiManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Manage midi events.

    + + + + +
    + + + + + + + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.MidiManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the midi event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.MidiManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add midi-specific arguments to the global parser.

    +

    This class method will get called automatically by the GameEngine class.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.MouseManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Mouse manager event handler.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.MouseManager.proxies + + + + instance-attribute + + +
    +
    proxies = [MouseProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.MouseManager.MouseProxy + + +
    + + +
    +

    + Bases: MouseEvents, ResourceManager

    + + +

    Mouse manager event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.mouse_state + + + + instance-attribute + + + +
    mouse_state = {}
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.mouse_dragging + + + + instance-attribute + + + +
    mouse_dragging = False
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.mouse_dropping + + + + instance-attribute + + + +
    mouse_dropping = False
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.current_focus + + + + instance-attribute + + + +
    current_focus = None
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.previous_focus + + + + instance-attribute + + + +
    previous_focus = None
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.focus_locked + + + + instance-attribute + + + +
    focus_locked = False
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, mouse]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the mouse manager event proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_motion_event + + + +
    on_mouse_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_drag_event + + + +
    on_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_drop_event + + + +
    on_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_drag_event + + + +
    on_left_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the left mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_drop_event + + + +
    on_left_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the left mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_drag_event + + + +
    on_middle_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the middle mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_drop_event + + + +
    on_middle_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the middle mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_drag_event + + + +
    on_right_mouse_drag_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the right mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_drop_event + + + +
    on_right_mouse_drop_event(event: Event, trigger: Event) -> None
    +
    + +
    + +

    Handle the right mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (Event) + – +
      +

      The triggering event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_focus_event + + + +
    on_mouse_focus_event(event: Event, entering_focus: object) -> None
    +
    + +
    + +

    Handle the mouse focus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + entering_focus + (object) + – +
      +

      The object entering focus.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_unfocus_event + + + +
    on_mouse_unfocus_event(event: Event, leaving_focus: object) -> None
    +
    + +
    + +

    Handle the mouse unfocus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + leaving_focus + (object) + – +
      +

      The object leaving focus.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_button_up_event + + + +
    on_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_button_up_event + + + +
    on_left_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the left mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_button_up_event + + + +
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the middle mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_button_up_event + + + +
    on_right_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the right mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_button_down_event + + + +
    on_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_left_mouse_button_down_event + + + +
    on_left_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the left mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_middle_mouse_button_down_event + + + +
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the middle mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_right_mouse_button_down_event + + + +
    on_right_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the right mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_scroll_down_event + + + +
    on_mouse_scroll_down_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse scroll down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_scroll_up_event + + + +
    on_mouse_scroll_up_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse scroll up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.MouseManager.MouseProxy.on_mouse_wheel_event + + + +
    on_mouse_wheel_event(event: Event) -> None
    +
    + +
    + +

    Handle the mouse wheel event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.MouseManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the mouse manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.MouseManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add arguments to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.TouchManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Touch event manager.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.TouchManager.proxies + + + + instance-attribute + + +
    +
    proxies = [TouchProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.TouchManager.TouchProxy + + +
    + + +
    +

    + Bases: TouchEvents, ResourceManager

    + + +

    Touch event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.fingers + + + + instance-attribute + + + +
    fingers: dict = {}
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.game + + + + instance-attribute + + + +
    game: object = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.proxies + + + + instance-attribute + + + +
    proxies: list = [game, touch]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the finger event proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_touch_down_event + + + +
    on_touch_down_event(event: Event) -> None
    +
    + +
    + +

    Handle finger down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_touch_motion_event + + + +
    on_touch_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle finger motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_touch_up_event + + + +
    on_touch_up_event(event: Event) -> None
    +
    + +
    + +

    Handle finger up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_down_event + + + +
    on_multi_touch_down_event(event: Event) -> None
    +
    + +
    + +

    Handle multi-touch down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_motion_event + + + +
    on_multi_touch_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle multi-touch motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.TouchManager.TouchProxy.on_multi_touch_up_event + + + +
    on_multi_touch_up_event(event: Event) -> None
    +
    + +
    + +

    Handle multi-touch up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.TouchManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the touch event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.WindowManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Window manager event handler.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.WindowManager.proxies + + + + instance-attribute + + +
    +
    proxies = [WindowManagerProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.WindowManager.WindowManagerProxy + + +
    + + +
    +

    + Bases: WindowEvents, ResourceManager

    + + +

    Window manager event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.proxies + + + + instance-attribute + + + +
    proxies = [game]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the window manager proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_close_event + + + +
    on_window_close_event(event: Event) -> None
    +
    + +
    + +

    Handle the window close event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_enter_event + + + +
    on_window_enter_event(event: Event) -> None
    +
    + +
    + +

    Handle the window enter event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_exposed_event + + + +
    on_window_exposed_event(event: Event) -> None
    +
    + +
    + +

    Handle the window exposed event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_focus_gained_event + + + +
    on_window_focus_gained_event(event: Event) -> None
    +
    + +
    + +

    Handle the window focus gained event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_focus_lost_event + + + +
    on_window_focus_lost_event(event: Event) -> None
    +
    + +
    + +

    Handle the window focus lost event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_hidden_event + + + +
    on_window_hidden_event(event: Event) -> None
    +
    + +
    + +

    Handle the window hidden event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_hit_test_event + + + +
    on_window_hit_test_event(event: Event) -> None
    +
    + +
    + +

    Handle the window hit test event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_leave_event + + + +
    on_window_leave_event(event: Event) -> None
    +
    + +
    + +

    Handle the window leave event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_maximized_event + + + +
    on_window_maximized_event(event: Event) -> None
    +
    + +
    + +

    Handle the window maximized event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_minimized_event + + + +
    on_window_minimized_event(event: Event) -> None
    +
    + +
    + +

    Handle the window minimized event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_moved_event + + + +
    on_window_moved_event(event: Event) -> None
    +
    + +
    + +

    Handle the window moved event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_resized_event + + + +
    on_window_resized_event(event: Event) -> None
    +
    + +
    + +

    Handle the window resized event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_restored_event + + + +
    on_window_restored_event(event: Event) -> None
    +
    + +
    + +

    Handle the window restored event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_shown_event + + + +
    on_window_shown_event(event: Event) -> None
    +
    + +
    + +

    Handle the window shown event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_size_changed_event + + + +
    on_window_size_changed_event(event: Event) -> None
    +
    + +
    + +

    Handle the window size changed event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.WindowManager.WindowManagerProxy.on_window_take_focus_event + + + +
    on_window_take_focus_event(event: Event) -> None
    +
    + +
    + +

    Handle the window take focus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.WindowManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the window event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.WindowManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add window-specific arguments to the global parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.FontManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    A font manager.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.FontManager.OPTIONS + + + + class-attribute + instance-attribute + + +
    +
    OPTIONS: ClassVar = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.FontManager.RENDER_CACHE + + + + class-attribute + instance-attribute + + +
    +
    RENDER_CACHE: ClassVar = {}
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.FontManager.FontProxy + + +
    + + +
    +

    + Bases: FontEvents, ResourceManager

    + + +

    A font proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.FontManager.FontProxy.game + + + + instance-attribute + + + +
    game = game
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.FontManager.FontProxy.proxies + + + + instance-attribute + + + +
    proxies = [game, freetype]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.FontManager.FontProxy.__init__ + + + +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the font proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.FontManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the font manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game object.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.FontManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add font options to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      argparse.ArgumentParser

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.FontManager.font + + + + classmethod + + +
    +
    font(font_config: dict | None = None) -> Font | SysFont
    +
    + +
    + +

    Return a font object.

    +

    If the font requested can't be found then bitstream_vera will be loaded instead.

    +

    Note that if you are trying to package your game with pyinstaller, you'll need to bundle +your game's fonts with the pyinstaller invocation. Make sure you have distribution +rights to the fonts you're including with your game.

    +

    bitstream_vera is a permissively licensed font that can be used with your game.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + font_config + (dict | None, default: + None +) + – +
      +

      The font configuration.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + Font | SysFont + – +
      +

      pygame.freetype.Font | pygame.freetype.SysFont

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.Scene + + +

    + + +
    +

    + Bases: SceneInterface, SpriteInterface, AllEventStubs

    + + +

    Scene object base class.

    +

    Subclass this to properly receive on_*_event() messages automatically.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.Scene.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.FPS + + + + class-attribute + instance-attribute + + +
    +
    FPS = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.NAME + + + + class-attribute + instance-attribute + + +
    +
    NAME = 'Unnamed Scene'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.VERSION + + + + class-attribute + instance-attribute + + +
    +
    VERSION = '0.0'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.target_fps + + + + instance-attribute + + +
    +
    target_fps = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.fps + + + + instance-attribute + + +
    +
    fps = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dt + + + + instance-attribute + + +
    +
    dt = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dt_timer + + + + instance-attribute + + +
    +
    dt_timer = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.dirty + + + + instance-attribute + + +
    +
    dirty = 1
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.options + + + + instance-attribute + + +
    +
    options = options
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.scene_manager + + + + instance-attribute + + +
    +
    scene_manager = SceneManager()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.name + + + + instance-attribute + + +
    +
    name = type(self)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.next_scene + + + + instance-attribute + + +
    +
    next_scene = self
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.rects + + + + instance-attribute + + +
    +
    rects = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.screen + + + + instance-attribute + + +
    +
    screen = get_surface()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.screen_width + + + + instance-attribute + + +
    +
    screen_width = get_width()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.screen_height + + + + instance-attribute + + +
    +
    screen_height = get_height()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.all_sprites + + + + instance-attribute + + +
    +
    all_sprites = groups
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.background + + + + instance-attribute + + +
    +
    background = Surface(get_size())
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.background_color + + + + property + writable + + +
    +
    background_color: Color
    +
    + +
    + +

    Return the background color.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + Color + – +
      +

      pygame.Color: The background color.

      +
      +
    • +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.image + + + + instance-attribute + + +
    +
    image = screen
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.rect + + + + instance-attribute + + +
    +
    rect = get_rect()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Scene.screenshot + + + + property + + +
    +
    screenshot: Surface
    +
    + +
    + +

    Return a screenshot of the scene.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + Surface + – +
      +

      pygame.Surface: The scene screenshot.

      +
      +
    • +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.Scene.__init__ + + +
    +
    __init__(options: dict | None = None, groups: LayeredDirty | None = None) -> None
    +
    + +
    + +

    Initialize the scene.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + options + (dict | None, default: + None +) + – +
      +

      The options passed to the game.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.setup + + +
    +
    setup() -> None
    +
    + +
    + +

    Setup the scene.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.cleanup + + +
    +
    cleanup() -> None
    +
    + +
    + +

    Cleanup the scene.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.dt_tick + + +
    +
    dt_tick(dt: float) -> None
    +
    + +
    + +

    Update the scene's delta time.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + dt + (float) + – +
      +

      The delta time to update.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.update + + +
    +
    update() -> None
    +
    + +
    + +

    Update the active scene.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.render + + +
    +
    render(screen: Surface) -> None
    +
    + +
    + +

    Render the active scene.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + screen + (Surface) + – +
      +

      The screen to render to.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.sprites_at_position + + +
    +
    sprites_at_position(pos: tuple) -> list[Sprite] | None
    +
    + +
    + +

    Return the sprites at a given position.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + pos + (tuple) + – +
      +

      The position to check.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + list[Sprite] | None + – +
      +

      list[pygame.sprite.Sprite] | None: The sprites at the given position.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_controller_button_down_event + + +
    +
    on_controller_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_controller_button_up_event + + +
    +
    on_controller_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle controller button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_joy_button_down_event + + +
    +
    on_joy_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle joy button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_joy_button_up_event + + +
    +
    on_joy_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle joy button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_key_up_event + + +
    +
    on_key_up_event(event: Event) -> None
    +
    + +
    + +

    Handle key up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_mouse_drag_event + + +
    +
    on_mouse_drag_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle mouse drag events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_mouse_drop_event + + +
    +
    on_mouse_drop_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle mouse drop events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_left_mouse_drag_event + + +
    +
    on_left_mouse_drag_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle left mouse drag events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_left_mouse_drop_event + + +
    +
    on_left_mouse_drop_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle left mouse drop events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_middle_mouse_drag_event + + +
    +
    on_middle_mouse_drag_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle middle mouse drag events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_middle_mouse_drop_event + + +
    +
    on_middle_mouse_drop_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle middle mouse drop events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_right_mouse_drag_event + + +
    +
    on_right_mouse_drag_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle right mouse drag events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_right_mouse_drop_event + + +
    +
    on_right_mouse_drop_event(event: Event, trigger: object) -> None
    +
    + +
    + +

    Handle right mouse drop events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object) + – +
      +

      The event trigger.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_left_mouse_button_up_event + + +
    +
    on_left_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle left mouse button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_middle_mouse_button_up_event + + +
    +
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle middle mouse button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_right_mouse_button_up_event + + +
    +
    on_right_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle right mouse button up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_left_mouse_button_down_event + + +
    +
    on_left_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle left mouse button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_middle_mouse_button_down_event + + +
    +
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle middle mouse button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_right_mouse_button_down_event + + +
    +
    on_right_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle right mouse button down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_sys_wm_event + + +
    +
    on_sys_wm_event(event: Event) -> None
    +
    + +
    + +

    Handle sys wm events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_text_editing_event + + +
    +
    on_text_editing_event(event: Event) -> None
    +
    + +
    + +

    Handle text editing events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_text_input_event + + +
    +
    on_text_input_event(event: Event) -> None
    +
    + +
    + +

    Handle text input events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_touch_down_event + + +
    +
    on_touch_down_event(event: Event) -> None
    +
    + +
    + +

    Handle touch down events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_touch_motion_event + + +
    +
    on_touch_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle touch motion events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_touch_up_event + + +
    +
    on_touch_up_event(event: Event) -> None
    +
    + +
    + +

    Handle touch up events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_user_event + + +
    +
    on_user_event(event: Event) -> None
    +
    + +
    + +

    Handle user events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_video_expose_event + + +
    +
    on_video_expose_event(event: Event) -> None
    +
    + +
    + +

    Handle video expose events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_video_resize_event + + +
    +
    on_video_resize_event(event: Event) -> None
    +
    + +
    + +

    Handle video resize events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_close_event + + +
    +
    on_window_close_event(event: Event) -> None
    +
    + +
    + +

    Handle window close events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_enter_event + + +
    +
    on_window_enter_event(event: Event) -> None
    +
    + +
    + +

    Handle window enter events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_exposed_event + + +
    +
    on_window_exposed_event(event: Event) -> None
    +
    + +
    + +

    Handle window exposed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_focus_gained_event + + +
    +
    on_window_focus_gained_event(event: Event) -> None
    +
    + +
    + +

    Handle window focus gained events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_focus_lost_event + + +
    +
    on_window_focus_lost_event(event: Event) -> None
    +
    + +
    + +

    Handle window focus lost events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_hidden_event + + +
    +
    on_window_hidden_event(event: Event) -> None
    +
    + +
    + +

    Handle window hidden events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_hit_test_event + + +
    +
    on_window_hit_test_event(event: Event) -> None
    +
    + +
    + +

    Handle window hit test events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_leave_event + + +
    +
    on_window_leave_event(event: Event) -> None
    +
    + +
    + +

    Handle window leave events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_maximized_event + + +
    +
    on_window_maximized_event(event: Event) -> None
    +
    + +
    + +

    Handle window maximized events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_minimized_event + + +
    +
    on_window_minimized_event(event: Event) -> None
    +
    + +
    + +

    Handle window minimized events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_moved_event + + +
    +
    on_window_moved_event(event: Event) -> None
    +
    + +
    + +

    Handle window moved events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_resized_event + + +
    +
    on_window_resized_event(event: Event) -> None
    +
    + +
    + +

    Handle window resized events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_restored_event + + +
    +
    on_window_restored_event(event: Event) -> None
    +
    + +
    + +

    Handle window restored events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_shown_event + + +
    +
    on_window_shown_event(event: Event) -> None
    +
    + +
    + +

    Handle window shown events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_size_changed_event + + +
    +
    on_window_size_changed_event(event: Event) -> None
    +
    + +
    + +

    Handle window size changed events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_window_take_focus_event + + +
    +
    on_window_take_focus_event(event: Event) -> None
    +
    + +
    + +

    Handle window take focus events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_quit_event + + +
    +
    on_quit_event(event: Event) -> None
    +
    + +
    + +

    Handle quit events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.on_fps_event + + +
    +
    on_fps_event(event: Event) -> None
    +
    + +
    + +

    Handle FPS events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Scene.load_resources + + +
    +
    load_resources() -> None
    +
    + +
    + +

    Load the scene's resources.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.SceneManager + + +

    + + +
    +

    + Bases: SceneInterface, EventManager

    + + +

    Glitchy Games Scene Manager.

    +

    The scene manager is responsible for managing the active scene, +and for processing events.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.SceneManager.log + + + + class-attribute + instance-attribute + + +
    +
    log: ClassVar = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.OPTIONS + + + + class-attribute + instance-attribute + + +
    +
    OPTIONS: ClassVar = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.screen + + + + instance-attribute + + +
    +
    screen = get_surface()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.update_type + + + + instance-attribute + + +
    +
    update_type = 'update'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.fps_refresh_rate + + + + instance-attribute + + +
    +
    fps_refresh_rate = 1000
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.target_fps + + + + instance-attribute + + +
    +
    target_fps = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.dt + + + + instance-attribute + + +
    +
    dt = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.timer + + + + instance-attribute + + +
    +
    timer = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.active_scene + + + + instance-attribute + + +
    +
    active_scene = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.next_scene + + + + instance-attribute + + +
    +
    next_scene = active_scene
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.previous_scene + + + + instance-attribute + + +
    +
    previous_scene = active_scene
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.quit_requested + + + + instance-attribute + + +
    +
    quit_requested = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.clock + + + + instance-attribute + + +
    +
    clock = Clock()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.game_engine + + + + property + writable + + +
    +
    game_engine: object
    +
    + +
    + +

    Return the game engine.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +object( object +) – +
      +

      The game engine.

      +
      +
    • +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.SceneManager.all_sprites + + + + property + + +
    +
    all_sprites: LayeredDirty | None
    +
    + +
    + +

    Return the active scene's sprite group.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + LayeredDirty | None + – +
      +

      pygame.sprite.LayeredDirty | None: The active scene's sprite group.

      +
      +
    • +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.SceneManager.__init__ + + +
    +
    __init__() -> None
    +
    + +
    + +

    Initialize the scene manager.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.switch_to_scene + + +
    +
    switch_to_scene(next_scene: Scene) -> None
    +
    + +
    + +

    Switch to the next scene.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + next_scene + (Scene) + – +
      +

      The next scene to switch to.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.play + + +
    +
    play() -> None
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.start + + +
    +
    start() -> None
    +
    + +
    + +

    Start the scene manager.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.stop + + +
    +
    stop() -> None
    +
    + +
    + +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.terminate + + +
    +
    terminate() -> None
    +
    + +
    + +

    Terminate the scene manager.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.quit + + +
    +
    quit() -> None
    +
    + +
    + +

    Quit the game.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.quit_game + + +
    +
    quit_game() -> None
    +
    + +
    + +

    Quit the game.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.on_quit_event + + +
    +
    on_quit_event(event: Event) -> None
    +
    + +
    + +

    Handle quit events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.on_fps_event + + +
    +
    on_fps_event(event: Event) -> None
    +
    + +
    + +

    Handle FPS events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.on_game_event + + +
    +
    on_game_event(event: Event) -> None
    +
    + +
    + +

    Handle game events.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.register_game_event + + +
    +
    register_game_event(event_type: EventType, callback: Callable) -> None
    +
    + +
    + +

    Register a game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event_type + (EventType) + – +
      +

      The event type to register.

      +
      +
    • +
    • + callback + (Callable) + – +
      +

      The callback to call when the event is triggered.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.SceneManager.__getattr__ + + +
    +
    __getattr__(attr: str) -> Callable
    +
    + +
    + +

    Proxy calls to the active scene.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + attr + (str) + – +
      +

      The attribute to proxy.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +Callable( Callable +) – +
      +

      The callable object.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.Sprite + + +

    + + +
    +

    + Bases: RootSprite

    + + +

    A convenience class for handling all of the common sprite behaviors.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.Sprite.log + + + + class-attribute + instance-attribute + + +
    +
    log = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.USE_GFXDRAW + + + + class-attribute + instance-attribute + + +
    +
    USE_GFXDRAW: ClassVar = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.PROXIES + + + + class-attribute + instance-attribute + + +
    +
    PROXIES: ClassVar = [sprite]
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.SPRITE_BREAKPOINTS + + + + class-attribute + instance-attribute + + +
    +
    SPRITE_BREAKPOINTS: ClassVar = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.SPRITE_COUNTERS + + + + class-attribute + instance-attribute + + +
    +
    SPRITE_COUNTERS: ClassVar = OrderedDict()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.SPRITE_COUNT + + + + class-attribute + instance-attribute + + +
    +
    SPRITE_COUNT = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.image + + + + instance-attribute + + +
    +
    image = Surface((width, height))
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.rect + + + + instance-attribute + + +
    +
    rect = get_rect()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.dt + + + + instance-attribute + + +
    +
    dt = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.dt_timer + + + + instance-attribute + + +
    +
    dt_timer = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.name + + + + instance-attribute + + +
    +
    name = name
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.parent + + + + instance-attribute + + +
    +
    parent = parent
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.proxies + + + + instance-attribute + + +
    +
    proxies = [self]
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.callbacks + + + + instance-attribute + + +
    +
    callbacks = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.screen + + + + instance-attribute + + +
    +
    screen = get_surface()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.screen_width + + + + instance-attribute + + +
    +
    screen_width = get_width()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.screen_height + + + + instance-attribute + + +
    +
    screen_height = get_height()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.width + + + + property + writable + + +
    +
    width: int
    +
    + +
    + +

    Return the width of the sprite.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The width of the sprite.

      +
      +
    • +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.Sprite.height + + + + property + writable + + +
    +
    height: int
    +
    + +
    + +

    Return the height of the sprite.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The height of the sprite.

      +
      +
    • +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.Sprite.break_when + + + + classmethod + + +
    +
    break_when(sprite_type: object | None = None) -> None
    +
    + +
    + +

    Register a breakpoint for a sprite type.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + sprite_type + (object | None, default: + None +) + – +
      +

      The sprite type to break on.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.__init__ + + +
    +
    __init__(
    +    x: int,
    +    y: int,
    +    width: int,
    +    height: int,
    +    name: str | None = None,
    +    parent: object | None = None,
    +    groups: LayeredDirty | None = None,
    +) -> None
    +
    + +
    + +

    Initialize a Sprite.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + x + (int) + – +
      +

      The x coordinate of the sprite.

      +
      +
    • +
    • + y + (int) + – +
      +

      The y coordinate of the sprite.

      +
      +
    • +
    • + width + (int) + – +
      +

      The width of the sprite.

      +
      +
    • +
    • + height + (int) + – +
      +

      The height of the sprite.

      +
      +
    • +
    • + name + (str | None, default: + None +) + – +
      +

      The name of the sprite.

      +
      +
    • +
    • + parent + (object | None, default: + None +) + – +
      +

      The parent of the sprite.

      +
      +
    • +
    • + groups + (LayeredDirty | None, default: + None +) + – +
      +

      The sprite groups to add the sprite to.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.dt_tick + + +
    +
    dt_tick(dt: float) -> None
    +
    + +
    + +

    Update the sprite's delta time.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + dt + (float) + – +
      +

      The new delta time.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.update + + +
    +
    update() -> None
    +
    + +
    + +

    Update the sprite.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_axis_motion_event + + +
    +
    on_joy_axis_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick axis motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_button_down_event + + +
    +
    on_joy_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_button_up_event + + +
    +
    on_joy_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_hat_motion_event + + +
    +
    on_joy_hat_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick hat motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_joy_ball_motion_event + + +
    +
    on_joy_ball_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a joystick ball motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_motion_event + + +
    +
    on_mouse_motion_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse motion event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_focus_event + + +
    +
    on_mouse_focus_event(event: Event, old_focus: object) -> None
    +
    + +
    + +

    Handle a mouse focus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + old_focus + (object) + – +
      +

      The old focus.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_unfocus_event + + +
    +
    on_mouse_unfocus_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse unfocus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_enter_event + + +
    +
    on_mouse_enter_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse enter event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_exit_event + + +
    +
    on_mouse_exit_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse exit event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_drag_down_event + + +
    +
    on_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a mouse drag down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_drag_down_event + + +
    +
    on_left_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a left mouse drag down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_drag_up_event + + +
    +
    on_left_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a left mouse drag up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_drag_down_event + + +
    +
    on_middle_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a middle mouse drag down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_drag_up_event + + +
    +
    on_middle_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a middle mouse drag up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_drag_down_event + + +
    +
    on_right_mouse_drag_down_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drag down event.

    +

    Args: +event (pygame.event.Event): The event to handle. +trigger (object | None): The object that triggered the event.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_drag_up_event + + +
    +
    on_right_mouse_drag_up_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drag up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_drag_up_event + + +
    +
    on_mouse_drag_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse drag up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_button_up_event + + +
    +
    on_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_button_up_event + + +
    +
    on_left_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a left mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_button_up_event + + +
    +
    on_middle_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a middle mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_button_up_event + + +
    +
    on_right_mouse_button_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a right mouse button up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_button_down_event + + +
    +
    on_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_button_down_event + + +
    +
    on_left_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a left mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_button_down_event + + +
    +
    on_middle_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a middle mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_button_down_event + + +
    +
    on_right_mouse_button_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a right mouse button down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_scroll_down_event + + +
    +
    on_mouse_scroll_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse scroll down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_scroll_up_event + + +
    +
    on_mouse_scroll_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse scroll up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_chord_up_event + + +
    +
    on_mouse_chord_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse chord up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_chord_down_event + + +
    +
    on_mouse_chord_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a mouse chord down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_key_down_event + + +
    +
    on_key_down_event(event: Event) -> None
    +
    + +
    + +

    Handle a key down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_key_up_event + + +
    +
    on_key_up_event(event: Event) -> None
    +
    + +
    + +

    Handle a key up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_key_chord_down_event + + +
    +
    on_key_chord_down_event(event: Event, keys: list) -> None
    +
    + +
    + +

    Handle a key chord down event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + keys + (list) + – +
      +

      The keys that were pressed.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_key_chord_up_event + + +
    +
    on_key_chord_up_event(event: Event, keys: list) -> None
    +
    + +
    + +

    Handle a key chord up event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + keys + (list) + – +
      +

      The keys that were pressed.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_quit_event + + +
    +
    on_quit_event(event: Event) -> None
    +
    + +
    + +

    Handle a quit event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_active_event + + +
    +
    on_active_event(event: Event) -> None
    +
    + +
    + +

    Handle an active event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_video_resize_event + + +
    +
    on_video_resize_event(event: Event) -> None
    +
    + +
    + +

    Handle a video resize event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_video_expose_event + + +
    +
    on_video_expose_event(event: Event) -> None
    +
    + +
    + +

    Handle a video expose event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_sys_wm_event + + +
    +
    on_sys_wm_event(event: Event) -> None
    +
    + +
    + +

    Handle a sys wm event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_user_event + + +
    +
    on_user_event(event: Event) -> None
    +
    + +
    + +

    Handle a user event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_drag_event + + +
    +
    on_left_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a left mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_drag_event + + +
    +
    on_middle_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a middle mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_drag_event + + +
    +
    on_right_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_left_mouse_drop_event + + +
    +
    on_left_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a left mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_middle_mouse_drop_event + + +
    +
    on_middle_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a middle mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_right_mouse_drop_event + + +
    +
    on_right_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a right mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_drag_event + + +
    +
    on_mouse_drag_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a mouse drag event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_drop_event + + +
    +
    on_mouse_drop_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a mouse drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.on_mouse_wheel_event + + +
    +
    on_mouse_wheel_event(event: Event, trigger: object | None) -> None
    +
    + +
    + +

    Handle a mouse wheel event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event to handle.

      +
      +
    • +
    • + trigger + (object | None) + – +
      +

      The object that triggered the event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.Sprite.__str__ + + +
    +
    __str__() -> str
    +
    + +
    + +

    Returns a string representation of the sprite.

    + +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.GameManager + + +

    + + +
    +

    + Bases: ResourceManager

    + + +

    Game event manager.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.GameManager.log + + + + class-attribute + instance-attribute + + +
    +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameManager.proxies + + + + instance-attribute + + +
    +
    proxies: list[GameProxy] = [GameProxy(game=game)]
    +
    + +
    +
    + +
    +
    Classes
    + +
    + + + +
    + glitchygames.engine.GameManager.GameProxy + + +
    + + +
    +

    + Bases: ResourceManager

    + + +

    Game event proxy.

    + + + + +
    + + + + + +Attributes + +
    + + + + + glitchygames.engine.GameManager.GameProxy.log + + + + class-attribute + instance-attribute + + + +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.GameManager.GameProxy.game + + + + instance-attribute + + + +
    game: object = get('game')
    +
    + +
    +
    + +
    + +
    + + + + + glitchygames.engine.GameManager.GameProxy.proxies + + + + instance-attribute + + + +
    proxies = [game]
    +
    + +
    +
    + +
    + +Functions + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.__init__ + + + +
    __init__(**kwargs) -> None
    +
    + +
    + +

    Initialize the game proxy.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + **kwargs + – +
      +

      Keyword arguments.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_active_event + + + +
    on_active_event(event: Event) -> None
    +
    + +
    + +

    Handle active event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_fps_event + + + +
    on_fps_event(event: Event) -> None
    +
    + +
    + +

    Handle fps event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_game_event + + + +
    on_game_event(event: Event) -> None
    +
    + +
    + +

    Handle game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_menu_item_event + + + +
    on_menu_item_event(event: Event) -> None
    +
    + +
    + +

    Handle menu item event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_sys_wm_event + + + +
    on_sys_wm_event(event: Event) -> None
    +
    + +
    + +

    Handle sys wm event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_user_event + + + +
    on_user_event(event: Event) -> None
    +
    + +
    + +

    Handle user event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_video_expose_event + + + +
    on_video_expose_event(event: Event) -> None
    +
    + +
    + +

    Handle video expose event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_video_resize_event + + + +
    on_video_resize_event(event: Event) -> None
    +
    + +
    + +

    Handle video resize event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + + + glitchygames.engine.GameManager.GameProxy.on_quit_event + + + +
    on_quit_event(event: Event) -> None
    +
    + +
    + +

    Handle quit event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The pygame event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    +
    Functions
    + + +
    + + + +
    + glitchygames.engine.GameManager.__init__ + + +
    +
    __init__(game: object = None) -> None
    +
    + +
    + +

    Initialize the game event manager.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object, default: + None +) + – +
      +

      The game instance.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameManager.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add arguments to the argument parser.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +

    + glitchygames.engine.GameEngine + + +

    + + +
    +

    + Bases: EventManager

    + + +

    Glitchy Games' Game engine.

    +

    The game engine is responsible for initializing pygame and +handling events. It also provides a number of helper methods +for common tasks such as setting the screen resolution and +setting the cursor.

    +

    Every Glitchy Game game inherits the GameEngine command line +options, so you can add your own command line options by +implementing the args() class method in your Scene class.

    + + + + +
    + + + + + +
    Attributes
    + +
    + + + +
    + glitchygames.engine.GameEngine.log + + + + class-attribute + instance-attribute + + +
    +
    log: Logger = LOG
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.game + + + + class-attribute + instance-attribute + + +
    +
    game: object = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.icon + + + + class-attribute + instance-attribute + + +
    +
    icon: Surface = load(Path(ASSET_PATH) / 'glitch.png')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.NAME + + + + class-attribute + instance-attribute + + +
    +
    NAME: Literal['Boilerplate Adventures'] = 'Boilerplate Adventures'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.VERSION + + + + class-attribute + instance-attribute + + +
    +
    VERSION: Literal['1.0'] = '1.0'
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.OPTIONS + + + + class-attribute + instance-attribute + + +
    +
    OPTIONS: ClassVar = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.LAST_EVENT_MISS + + + + class-attribute + instance-attribute + + +
    +
    LAST_EVENT_MISS: ClassVar = None
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.MISSING_EVENTS + + + + class-attribute + instance-attribute + + +
    +
    MISSING_EVENTS: ClassVar = []
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.UNIMPLEMENTED_EVENTS + + + + class-attribute + instance-attribute + + +
    +
    UNIMPLEMENTED_EVENTS: ClassVar = []
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.USE_FASTEVENTS + + + + class-attribute + instance-attribute + + +
    +
    USE_FASTEVENTS: ClassVar = False
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.EVENT_HANDLERS + + + + class-attribute + instance-attribute + + +
    +
    EVENT_HANDLERS: ClassVar = {}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.fps + + + + instance-attribute + + +
    +
    fps: float = get('fps', 0.0)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.update_type + + + + instance-attribute + + +
    +
    update_type = get('update_type')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.use_gfxdraw + + + + instance-attribute + + +
    +
    use_gfxdraw = get('use_gfxdraw')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.windowed + + + + instance-attribute + + +
    +
    windowed = get('windowed')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.fps_refresh_rate + + + + instance-attribute + + +
    +
    fps_refresh_rate = get('fps_refresh_rate')
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.pygame_version + + + + instance-attribute + + +
    +
    pygame_version = {'major': 0, 'minor': 0, 'patch': 0}
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.scene_manager + + + + instance-attribute + + +
    +
    scene_manager: SceneManager = SceneManager()
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.mode_flags + + + + instance-attribute + + +
    +
    mode_flags: int = 0
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.desired_resolution + + + + instance-attribute + + +
    +
    desired_resolution: tuple[int, int] = suggested_resolution(desired_width, desired_height)
    +
    + +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.screen_width + + + + property + + +
    +
    screen_width: int
    +
    + +
    + +

    Get the screen width.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The screen width.

      +
      +
    • +
    +
    + +
    + +
    + + + +
    + glitchygames.engine.GameEngine.screen_height + + + + property + + +
    +
    screen_height: int
    +
    + +
    + +

    Get the screen height.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +int( int +) – +
      +

      The screen height.

      +
      +
    • +
    +
    + +
    + +
    Functions
    + + +
    + + + +
    + glitchygames.engine.GameEngine.__init__ + + +
    +
    __init__(game: object, icon: Surface | Path | str = None) -> None
    +
    + +
    + +

    Initialize the game engine.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + game + (object) + – +
      +

      The game instance.

      +
      +
    • +
    • + icon + (Surface | Path | str, default: + None +) + – +
      +

      The game icon.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.initialize_display + + +
    +
    initialize_display() -> None
    +
    + +
    + +

    Initialize the display.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.initialize_event_handlers + + +
    +
    initialize_event_handlers() -> None
    +
    + +
    + +

    Initialize event handlers.

    +

    The engine calls this on your behalf.

    +

    Event subsystem bootstrapping

    +

    This gives us much faster event processing than +doing a lookup every time an event comes in since +we can just call the processing function directly.

    +

    It's not as fast as a raw pygame event loop, +but since we layer richer event types on top of +the pygame raw events, this gives us a nice balance +of extensibility with performance.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.initialize_input_event_handlers + + +
    +
    initialize_input_event_handlers() -> None
    +
    + +
    + +

    Initialize input event handlers.

    +

    The engine calls this on your behalf.

    +

    This initializes the input event handlers.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.__del__ + + +
    +
    __del__() -> None
    +
    + +
    + +

    Delete the game engine.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.print_system_info + + +
    +
    print_system_info() -> None
    +
    + +
    + +

    Print system information.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.print_game_info + + +
    +
    print_game_info() -> None
    +
    + +
    + +

    Print game information.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.suggested_resolution + + +
    +
    suggested_resolution(desired_width: int = 0, desired_height: int = 0) -> tuple[int, int]
    +
    + +
    + +

    Suggest a resolution.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + desired_width + (int, default: + 0 +) + – +
      +

      The desired width.

      +
      +
    • +
    • + desired_height + (int, default: + 0 +) + – +
      +

      The desired height.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + tuple[int, int] + – +
      +

      tuple[int, int]: The suggested resolution.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.set_cursor + + + + classmethod + + +
    +
    set_cursor(
    +    cursor: list[str], cursor_black: str = ".", cursor_white: str = "X", cursor_xor: str = "o"
    +) -> list[str]
    +
    + +
    + +

    Set the cursor.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + cursor + (list[str]) + – +
      +

      The cursor.

      +
      +
    • +
    • + cursor_black + (str, default: + '.' +) + – +
      +

      The black cursor.

      +
      +
    • +
    • + cursor_white + (str, default: + 'X' +) + – +
      +

      The white cursor.

      +
      +
    • +
    • + cursor_xor + (str, default: + 'o' +) + – +
      +

      The xor cursor.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + list[str] + – +
      +

      list[str]: The cursor.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.initialize_system_icons + + +
    +
    initialize_system_icons() -> None
    +
    + +
    + +

    Initialize system icons.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.args + + + + classmethod + + +
    +
    args(parser: ArgumentParser) -> ArgumentParser
    +
    + +
    + +

    Add Glitchy Games arguments to the argument parser.

    +

    All Glitchy Games will inherit these arguments.

    + +
    + Supported Arguments +

    -f, --target-fps +--fps-refresh-rate +-w, --windowed +-r, --resolution +--use-gfxdraw +--update-type +--video-driver

    +
    + + + + + + + + + + + + + +
    Parameters: +
      +
    • + parser + (ArgumentParser) + – +
      +

      The argument parser.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + ArgumentParser + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.start + + +
    +
    start() -> None
    +
    + +
    + +

    Start the game engine.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.quit_game + + + + classmethod + + +
    +
    quit_game() -> None
    +
    + +
    + +

    Quit the game.

    +

    Emits a pygame.event.Event(pygame.QUIT, {}) event.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_events + + +
    +
    process_events() -> bool
    +
    + +
    + +

    Process events.

    + + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_audio_event + + +
    +
    process_audio_event(event: Event) -> bool
    +
    + +
    + +

    Process an audio event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_controller_event + + +
    +
    process_controller_event(event: Event) -> bool
    +
    + +
    + +

    Process a controller event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_drop_event + + +
    +
    process_drop_event(event: Event) -> bool
    +
    + +
    + +

    Process a drop event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_touch_event + + +
    +
    process_touch_event(event: Event) -> bool
    +
    + +
    + +

    Process a touch event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_midi_event + + +
    +
    process_midi_event(event: Event) -> bool
    +
    + +
    + +

    Process a midi event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_mouse_event + + +
    +
    process_mouse_event(event: Event) -> bool
    +
    + +
    + +

    Process a mouse event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_keyboard_event + + +
    +
    process_keyboard_event(event: Event) -> bool
    +
    + +
    + +

    Process a keyboard event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_joystick_event + + +
    +
    process_joystick_event(event: Event) -> bool
    +
    + +
    + +

    Process a joystick event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_text_event + + +
    +
    process_text_event(event: Event) -> None
    +
    + +
    + +

    Process a text event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( None +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_window_focus_event + + +
    +
    process_window_focus_event(event: Event) -> bool
    +
    + +
    + +

    Process a window focus event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( bool +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_window_event + + +
    +
    process_window_event(event: Event) -> None
    +
    + +
    + +

    Process a window event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( None +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_game_event + + +
    +
    process_game_event(event: Event) -> None
    +
    + +
    + +

    Process a game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +bool( None +) – +
      +

      True if the event was handled, False otherwise.

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.process_unimplemented_event + + +
    +
    process_unimplemented_event(event: Event) -> None
    +
    + +
    + +

    Process an unimplemented event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event + (Event) + – +
      +

      The event.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.post_game_event + + +
    +
    post_game_event(event_subtype: EventType, event_data: dict) -> None
    +
    + +
    + +

    Post a game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event_subtype + (EventType) + – +
      +

      The event subtype.

      +
      +
    • +
    • + event_data + (dict) + – +
      +

      The event data.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.suppress_event + + +
    +
    suppress_event(*args, attr: str, **kwargs) -> None
    +
    + +
    + +

    Suppress an event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + *args + – +
      +

      The args.

      +
      +
    • +
    • + attr + (str) + – +
      +

      The attribute.

      +
      +
    • +
    • + **kwargs + – +
      +

      The kwargs.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.register_game_event + + +
    +
    register_game_event(event_type: EventType, callback: Callable) -> None
    +
    + +
    + +

    Register a game event.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + event_type + (EventType) + – +
      +

      The event type.

      +
      +
    • +
    • + callback + (Callable) + – +
      +

      The callback.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.missing_event + + +
    +
    missing_event(*args, **kwargs) -> None
    +
    + +
    + +

    Suppress unhandled on_*_event methods.

    +

    We only want to log this once per event type.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + *args + – +
      +

      The args.

      +
      +
    • +
    • + **kwargs + – +
      +

      The kwargs.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • + None + – +
      +

      None

      +
      +
    • +
    +
    +
    + +
    + + +
    + + + +
    + glitchygames.engine.GameEngine.__getattr__ + + +
    +
    __getattr__(attr: str) -> Callable
    +
    + +
    + +

    Suppress unhandled on_*_event methods.

    +

    If the attribute being looked up is not an on_*_event +attribute, raise AttributeError as usual.

    + + + + + + + + + + + + + + +
    Parameters: +
      +
    • + attr + (str) + – +
      +

      The attribute to proxy.

      +
      +
    • +
    +
    + + + + + + + + + + + + + +
    Returns: +
      +
    • +Callable( Callable +) – +
      +

      The callable object.

      +
      +
    • +
    +
    +
    + +
    + + + +
    + +
    + + +
    + + + + +
    + +
    + +