mini_arcade_pygame_backend.pygame_backend¶
Pygame backend façade.
Classes¶
Pygame backend for mini-arcade. |
Module Contents¶
- class mini_arcade_pygame_backend.pygame_backend.PygameBackend(settings: mini_arcade_pygame_backend.config.PygameBackendSettings)¶
Pygame backend for mini-arcade.
- Variables:
settings – Backend settings.
- window: mini_arcade_pygame_backend.ports.window.WindowPort | None = None¶
- input: mini_arcade_pygame_backend.ports.input.InputPort | None = None¶
- render: mini_arcade_pygame_backend.ports.render.RenderPort | None = None¶
- text: mini_arcade_pygame_backend.ports.text.TextPort | None = None¶
- audio: mini_arcade_pygame_backend.ports.audio.AudioPort | None = None¶
- capture: mini_arcade_pygame_backend.ports.capture.CapturePort | None = None¶
- init()¶
Initialize the pygame backend. This method sets up the necessary components for the backend to function.
- set_viewport_transform(offset_x: int, offset_y: int, scale: float)¶
Set the viewport transform.
- Parameters:
offset_x (int) – The x offset.
offset_y (int) – The y offset.
scale (float) – The scale factor.
- clear_viewport_transform()¶
Clear the viewport transform (reset to defaults).