[][src]Struct ggez::conf::WindowSetup

pub struct WindowSetup {
    pub title: String,
    pub samples: NumSamples,
    pub vsync: bool,
    pub icon: String,
    pub srgb: bool,
}

A builder structure containing window settings that must be set at init time and cannot be changed afterwards.

Defaults:

WindowSetup {
    title: "An easy, good game".to_owned(),
    samples: NumSamples::Zero,
    vsync: true,
    icon: "".to_owned(),
    srgb: true,
}

Fields

title: String

The window title.

samples: NumSamples

Number of samples to use for multisample anti-aliasing.

vsync: bool

Whether or not to enable vsync.

icon: String

A file path to the window's icon. It takes a path rooted in the resources directory (see the filesystem module for details), and an empty string results in a blank/default icon.

srgb: bool

Whether or not to enable sRGB (gamma corrected color) handling on the display.

Methods

impl WindowSetup[src]

pub fn title(self, title: &str) -> Self[src]

Set window title.

pub fn samples(self, samples: NumSamples) -> Self[src]

Set number of samples to use for multisample anti-aliasing.

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

Set whether vsync is enabled.

pub fn icon(self, icon: &str) -> Self[src]

Set the window's icon.

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

Set sRGB color mode.

Trait Implementations

impl PartialEq<WindowSetup> for WindowSetup[src]

impl Clone for WindowSetup[src]

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

Performs copy-assignment from source. Read more

impl Default for WindowSetup[src]

fn default() -> Self[src]

Return WindowSetup { title: String :: from ( "An easy, good game" ), samples: NumSamples :: Zero, vsync: true, icon: String :: new ( ), srgb: true }

impl Debug for WindowSetup[src]

impl Serialize for WindowSetup[src]

impl<'de> Deserialize<'de> for WindowSetup[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> 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.