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§
source§impl 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§
source§impl Clone for WindowSetup
impl Clone for WindowSetup
source§fn clone(&self) -> WindowSetup
fn clone(&self) -> WindowSetup
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for WindowSetup
impl Debug for WindowSetup
source§impl Default for WindowSetup
impl Default for WindowSetup
source§impl<'de> Deserialize<'de> for WindowSetup
impl<'de> Deserialize<'de> for WindowSetup
source§fn 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
source§impl PartialEq<WindowSetup> for WindowSetup
impl PartialEq<WindowSetup> for WindowSetup
source§fn eq(&self, other: &WindowSetup) -> bool
fn eq(&self, other: &WindowSetup) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
source§impl<T> HasMut<T> for T
impl<T> HasMut<T> for T
source§fn retrieve_mut(&mut self) -> &mut T
fn retrieve_mut(&mut self) -> &mut T
Method to retrieve the context type as mutable.