Struct ggez::conf::WindowSetup [−][src]
pub struct WindowSetup { pub title: String, pub icon: String, pub resizable: bool, pub allow_highdpi: bool, pub samples: NumSamples, }
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(), icon: "".to_owned(), resizable: false, allow_highdpi: true, samples: NumSamples::One, }
Fields
title: String
The window title.
icon: String
A file path to the window's icon.
It is rooted in the resources
directory (see the filesystem
module for details),
and an empty string results in a blank/default icon.
resizable: bool
Whether or not the window is resizable
allow_highdpi: bool
Whether or not to allow high DPI mode when creating the window
samples: NumSamples
Number of samples for multisample anti-aliasing
Methods
impl WindowSetup
[src]
impl WindowSetup
pub fn title(self, title: &str) -> Self
[src]
pub fn title(self, title: &str) -> Self
Set window title
pub fn icon(self, icon: &str) -> Self
[src]
pub fn icon(self, icon: &str) -> Self
Set the window's icon.
pub fn resizable(self, resizable: bool) -> Self
[src]
pub fn resizable(self, resizable: bool) -> Self
Set resizable
pub fn allow_highdpi(self, allow: bool) -> Self
[src]
pub fn allow_highdpi(self, allow: bool) -> Self
Set allow_highdpi
pub fn samples(self, samples: u32) -> Option<Self>
[src]
pub fn samples(self, samples: u32) -> Option<Self>
Set number of samples
Returns None if given an invalid value (valid values are powers of 2 from 1 to 16)
Trait Implementations
impl Debug for WindowSetup
[src]
impl Debug for WindowSetup
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for WindowSetup
[src]
impl Clone for WindowSetup
fn clone(&self) -> WindowSetup
[src]
fn clone(&self) -> WindowSetup
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for WindowSetup
[src]
impl Default for WindowSetup
fn default() -> Self
[src]
fn default() -> Self
Return WindowSetup { title: "An easy, good game".to_owned(), icon: "".to_owned(), resizable: false, allow_highdpi: true, samples: NumSamples::One }
impl PartialEq for WindowSetup
[src]
impl PartialEq for WindowSetup
fn eq(&self, other: &WindowSetup) -> bool
[src]
fn eq(&self, other: &WindowSetup) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &WindowSetup) -> bool
[src]
fn ne(&self, other: &WindowSetup) -> bool
This method tests for !=
.
impl Eq for WindowSetup
[src]
impl Eq for WindowSetup
Auto Trait Implementations
impl Send for WindowSetup
impl Send for WindowSetup
impl Sync for WindowSetup
impl Sync for WindowSetup