Struct ggez::conf::WindowSetup
source · [−]pub struct WindowSetup {
pub title: String,
pub samples: NumSamples,
pub vsync: bool,
pub icon: String,
pub srgb: bool,
}
Expand description
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::One,
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.
Implementations
sourceimpl WindowSetup
impl WindowSetup
sourcepub fn samples(self, samples: NumSamples) -> Self
pub fn samples(self, samples: NumSamples) -> Self
Set number of samples to use for multisample anti-aliasing.
Trait Implementations
sourceimpl Clone for WindowSetup
impl Clone for WindowSetup
sourcefn clone(&self) -> WindowSetup
fn clone(&self) -> WindowSetup
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for WindowSetup
impl Debug for WindowSetup
sourceimpl Default for WindowSetup
impl Default for WindowSetup
sourceimpl<'de> Deserialize<'de> for WindowSetup
impl<'de> Deserialize<'de> for WindowSetup
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<WindowSetup> for WindowSetup
impl PartialEq<WindowSetup> for WindowSetup
sourcefn eq(&self, other: &WindowSetup) -> bool
fn eq(&self, other: &WindowSetup) -> bool
sourceimpl Serialize for WindowSetup
impl Serialize for WindowSetup
impl Eq for WindowSetup
impl StructuralEq for WindowSetup
impl StructuralPartialEq for WindowSetup
Auto Trait Implementations
impl RefUnwindSafe for WindowSetup
impl Send for WindowSetup
impl Sync for WindowSetup
impl Unpin for WindowSetup
impl UnwindSafe for WindowSetup
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceimpl<T> HasMut<T> for T
impl<T> HasMut<T> for T
sourcefn retrieve_mut(&mut self) -> &mut T
fn retrieve_mut(&mut self) -> &mut T
Method to retrieve the context type as mutable.