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

pub struct WindowSetup {
    pub title: String,
    pub samples: NumSamples,
    pub vsync: bool,
    pub transparent: 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.


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


title: String

The window title.

samples: NumSamples

Number of samples to use for multisample anti-aliasing.

vsync: bool

Whether or not to enable vsync.

transparent: bool

Whether or not should the window's background be transparent.

TODO: I don't think I've ever even tried to use this??? Need tests!

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.


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 transparent(self, transparent: bool) -> Self[src]

Set if window background should be transparent.

TODO: Is this necessary? Do we ever want this?

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 Default for WindowSetup[src]

fn default() -> Self[src]

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

impl Clone for WindowSetup[src]

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

Performs copy-assignment from source. Read more

impl Debug for WindowSetup[src]

impl Serialize for WindowSetup[src]

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

Auto Trait Implementations

impl Send for WindowSetup

impl Sync for WindowSetup

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 = !

🔬 This is a nightly-only experimental API. (try_from)

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

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

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

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.