mini_arcade_core.backend.config =============================== .. py:module:: mini_arcade_core.backend.config .. autoapi-nested-parse:: Configuration and utility functions for the mini arcade native backend. Classes ------- .. autoapisummary:: mini_arcade_core.backend.config.WindowSettings mini_arcade_core.backend.config.RendererSettings mini_arcade_core.backend.config.FontSettings mini_arcade_core.backend.config.AudioSettings mini_arcade_core.backend.config.BackendSettings Module Contents --------------- .. py:class:: WindowSettings Configuration for a game window (not implemented). :ivar width (int): Width of the window in pixels. :ivar height (int): Height of the window in pixels. :ivar title (str): Title of the window. :ivar resizable (bool): Whether the window is resizable. Default is False. :ivar high_dpi (bool): Whether to enable high-DPI support. Default is False. .. py:attribute:: width :type: int :value: 800 .. py:attribute:: height :type: int :value: 600 .. py:attribute:: title :type: str :value: 'Mini Arcade' .. py:attribute:: resizable :type: bool :value: False .. py:attribute:: high_dpi :type: bool :value: False .. py:class:: RendererSettings Configuration for the renderer (not implemented). :ivar background_color (Color): Background color as (r,g,b, optional alpha). .. py:attribute:: background_color :type: mini_arcade_core.backend.types.Color :value: (0, 0, 0) .. py:method:: rgba() -> tuple[int, int, int, int] Get the background color in RGBA format. :return: Background color as (r,g,b,a) with alpha as 0-255 integer. :rtype: tuple[int, int, int, int] .. py:class:: FontSettings Configuration for font rendering (not implemented). :ivar name (str): Name of the font. :ivar font_path (Optional[str]): Path to the font file. :ivar font_size (int): Default font size. .. py:attribute:: name :type: str :value: 'default' .. py:attribute:: path :type: Optional[str] :value: None .. py:attribute:: size :type: int :value: 24 .. py:class:: AudioSettings Configuration for audio settings (not implemented). :ivar enable (bool): Whether to enable audio support. :ivar sounds (Optional[dict[str, str]]): Mapping of sound names to file paths. .. py:attribute:: enable :type: bool :value: False .. py:attribute:: sounds :type: Optional[dict[str, str]] :value: None .. py:class:: BackendSettings Settings for configuring the native backend. :ivar window (WindowSettings): Window settings for the backend. :ivar renderer (RendererSettings): Renderer settings for the backend. :ivar font (FontSettings): Font settings for text rendering. :ivar audio (AudioSettings): Audio settings for the backend. .. py:attribute:: window :type: WindowSettings .. py:attribute:: renderer :type: RendererSettings .. py:attribute:: fonts :type: list[FontSettings] .. py:attribute:: audio :type: AudioSettings .. py:method:: to_dict() -> dict Convert the BackendSettings to a dictionary. :return: Dictionary representation of the settings. :rtype: dict