mini_arcade_core.backend.config

Configuration and utility functions for the mini arcade native backend.

Classes

WindowSettings

Configuration for a game window (not implemented).

RendererSettings

Configuration for the renderer (not implemented).

FontSettings

Configuration for font rendering (not implemented).

AudioSettings

Configuration for audio settings (not implemented).

BackendSettings

Settings for configuring the native backend.

Module Contents

class mini_arcade_core.backend.config.WindowSettings[source]

Configuration for a game window (not implemented).

Variables:
  • (int) (height) – Width of the window in pixels.

  • (int) – Height of the window in pixels.

  • (str) (title) – Title of the window.

  • (bool) (high_dpi) – Whether the window is resizable. Default is False.

  • (bool) – Whether to enable high-DPI support. Default is False.

width: int = 800
height: int = 600
title: str = 'Mini Arcade'
resizable: bool = False
high_dpi: bool = False
class mini_arcade_core.backend.config.RendererSettings[source]

Configuration for the renderer (not implemented).

Variables:

(Color) (background_color) – Background color as (r,g,b, optional alpha).

background_color: mini_arcade_core.backend.types.Color = (0, 0, 0)
rgba() tuple[int, int, int, int][source]

Get the background color in RGBA format.

Returns:

Background color as (r,g,b,a) with alpha as 0-255 integer.

Return type:

tuple[int, int, int, int]

class mini_arcade_core.backend.config.FontSettings[source]

Configuration for font rendering (not implemented).

Variables:
  • (str) (name) – Name of the font.

  • (Optional[str]) (font_path) – Path to the font file.

  • (int) (font_size) – Default font size.

name: str = 'default'
path: str | None = None
size: int = 24
class mini_arcade_core.backend.config.AudioSettings[source]

Configuration for audio settings (not implemented).

Variables:
  • (bool) (enable) – Whether to enable audio support.

  • str]]) (sounds (Optional[dict[str,) – Mapping of sound names to file paths.

enable: bool = False
sounds: dict[str, str] | None = None
class mini_arcade_core.backend.config.BackendSettings[source]

Settings for configuring the native backend.

Variables:
  • (WindowSettings) (window) – Window settings for the backend.

  • (RendererSettings) (renderer) – Renderer settings for the backend.

  • (FontSettings) (font) – Font settings for text rendering.

  • (AudioSettings) (audio) – Audio settings for the backend.

window: WindowSettings
renderer: RendererSettings
fonts: list[FontSettings]
audio: AudioSettings
to_dict() dict[source]

Convert the BackendSettings to a dictionary.

Returns:

Dictionary representation of the settings.

Return type:

dict