[][src]Struct amethyst_renderer::DisplayConfig

pub struct DisplayConfig {
    pub title: String,
    pub fullscreen: bool,
    pub dimensions: Option<(u32, u32)>,
    pub min_dimensions: Option<(u32, u32)>,
    pub max_dimensions: Option<(u32, u32)>,
    pub icon: Option<String>,
    pub loaded_icon: Option<Icon>,
    pub vsync: bool,
    pub multisampling: u16,
    pub visibility: bool,
    pub always_on_top: bool,
    pub decorations: bool,
    pub maximized: bool,
    pub multitouch: bool,
    pub resizable: bool,
    pub transparent: bool,

Structure for holding the renderer configuration.


Example Ron config file:

    title: "Game title",
    dimensions: Some((640, 480)),
    max_dimensions: None,
    min_dimensions: None,
    fullscreen: false,
    multisampling: 0,
    visibility: true,
    vsync: true,
    always_on_top: false,
    decorations: true,
    maximized: false,
    multitouch: true,
    resizable: true,
    transparent: false,


title: String

Name of the application window.

fullscreen: bool

Enables or disables fullscreen mode.

dimensions: Option<(u32, u32)>

Current window dimensions, measured in pixels (px).

min_dimensions: Option<(u32, u32)>

Minimum window dimensions, measured in pixels (px).

max_dimensions: Option<(u32, u32)>

Maximum window dimensions, measured in pixels (px).

icon: Option<String>

Path to window icon.

loaded_icon: Option<Icon>

Window icon. This must be set before render initialization and takes precedence over icon.

vsync: bool

Enables or disables vertical synchronization.

multisampling: u16

Level of MSAA anti-aliasing.

visibility: bool

Sets the visibility of the window.

always_on_top: bool

Whether the window should always be on top of other windows.

decorations: bool

Whether the window should have borders and bars.

maximized: bool

Whether the window should be maximized upon creation.

multitouch: bool

Enable multitouch on iOS.

resizable: bool

Whether the window is resizable or not.

transparent: bool

Whether the the window should be transparent. If this is true, writing colors with alpha values different than 1.0 will produce a transparent window.


impl DisplayConfig[src]

pub fn to_windowbuilder(self, monitor_id: MonitorId) -> WindowBuilder[src]

Creates a WindowBuilder using the values set in the DisplayConfig

The MonitorId is needed to configure a fullscreen window

Trait Implementations

impl PartialEq<DisplayConfig> for DisplayConfig[src]

impl Default for DisplayConfig[src]

impl Clone for DisplayConfig[src]

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl From<WindowBuilder> for DisplayConfig[src]

impl Eq for DisplayConfig[src]

impl Debug for DisplayConfig[src]

impl Serialize for DisplayConfig[src]

impl<'de> Deserialize<'de> for DisplayConfig where
    DisplayConfig: Default

Auto Trait Implementations

impl Send for DisplayConfig

impl Sync for DisplayConfig

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> BorrowMut for T where
    T: ?Sized

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> TryDefault for T where
    T: Default

fn unwrap_default() -> Self

Calls try_default and panics on an error case.

impl<T> Any for T where
    T: Any

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> Erased for T