[][src]Struct ggez::conf::WindowMode

pub struct WindowMode {
    pub width: f32,
    pub height: f32,
    pub maximized: bool,
    pub fullscreen_type: FullscreenType,
    pub borderless: bool,
    pub min_width: f32,
    pub min_height: f32,
    pub max_width: f32,
    pub max_height: f32,
    pub resizable: bool,
}

A builder structure containing window settings that can be set at runtime and changed with graphics::set_mode().

Defaults:

WindowMode {
    width: 800.0,
    height: 600.0,
    maximized: false,
    fullscreen_type: FullscreenType::Windowed,
    borderless: false,
    min_width: 0.0,
    max_width: 0.0,
    min_height: 0.0,
    max_height: 0.0,
    resizable: false,
}

Fields

width: f32

Window width

height: f32

Window height

maximized: bool

Whether or not to maximize the window

fullscreen_type: FullscreenType

Fullscreen type

borderless: bool

Whether or not to show window decorations

min_width: f32

Minimum width for resizable windows; 0 means no limit

min_height: f32

Minimum height for resizable windows; 0 means no limit

max_width: f32

Maximum width for resizable windows; 0 means no limit

max_height: f32

Maximum height for resizable windows; 0 means no limit

resizable: bool

Whether or not the window is resizable

Methods

impl WindowMode[src]

pub fn dimensions(self, width: f32, height: f32) -> Self[src]

Set default window size, or screen resolution in true fullscreen mode.

pub fn maximized(self, maximized: bool) -> Self[src]

Set whether the window should be maximized.

pub fn fullscreen_type(self, fullscreen_type: FullscreenType) -> Self[src]

Set the fullscreen type.

pub fn borderless(self, borderless: bool) -> Self[src]

Set whether a window should be borderless in windowed mode.

pub fn min_dimensions(self, width: f32, height: f32) -> Self[src]

Set minimum window dimensions for windowed mode.

pub fn max_dimensions(self, width: f32, height: f32) -> Self[src]

Set maximum window dimensions for windowed mode.

pub fn resizable(self, resizable: bool) -> Self[src]

Set resizable.

Trait Implementations

impl PartialEq<WindowMode> for WindowMode[src]

impl Clone for WindowMode[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for WindowMode[src]

fn default() -> Self[src]

Return WindowMode { width: 800.0, height: 600.0, maximized: false, fullscreen_type: FullscreenType :: Windowed, borderless: false, min_width: 0.0, min_height: 0.0, max_width: 0.0, max_height: 0.0, resizable: false }

impl Copy for WindowMode[src]

impl Debug for WindowMode[src]

impl Serialize for WindowMode[src]

impl<'de> Deserialize<'de> for WindowMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Any + Debug
[src]

fn is<T>() -> bool where
    T: Scalar
[src]

Tests if Self the same as the type T Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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

impl<T> Erased for T

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.