Configuration

You can configure your app using the MayConfig struct.

It has many different fields to customize your application to your liking:

window: WindowConfig

Configures the application window.

title: String

The title of the window in desktop environments.

size: Vector2<f64>

The initial size of the window in desktop environments.

min_size: Vector2<f64>

The minimum size the window can have in desktop environments.

max_size: Vector2<f64>

The maximum size the window can have in desktop environments.

resizable: bool

Whether the window can be resized in desktop environments.

maximized: bool

Whether the window is maximized in desktop environments.

mode: WindowMode

The mode of the window in desktop environments. Can be WindowMode::Windowed, WindowMode::Borderless or WindowMode::Fullscreen.

level: WindowLevel

The level of the window in desktop environments. Can be WindowLevel::Normal, WindowLevel::AlwaysOnTop or WindowLevel::AlwaysOnBottom.

visible: bool

If the window should be visible on startup in desktop environments.

blur: bool

If the window background should be blurred in desktop environments.

transparent: bool

If the window background should be transparent in desktop environments. May not be compatible with all desktop environments.

position: Option<Point2<f64>>

The initial position of the window in desktop environments. Uses the default positioning if None.

active: bool

If the window should be active/focused on startup in desktop environments.

buttons: WindowButtons

The window buttons to enable in desktop environments.

decorations: bool

If the window should have decorations (borders) in desktop environments.

resize_increments: Option<Vector2<f64>>

The resize increments of the window in desktop environments. May not be compatible with all desktop environments.

content_protected: bool

Prevents window capturing by some apps (not all though).

icon: Option<WindowIcon>

The window icon in desktop environments.

cursor: Cursor

The window cursor in desktop environments.

close_on_request: bool

If the window should exit on close request (pressing the close window button) in desktop environments.

theme: Theme

The application theme.

graphics: VectorGraphicsInterface::Config

The configuration for the selected vector graphics interface.