Struct ggez::conf::WindowMode [−][src]
pub struct WindowMode { pub width: u32, pub height: u32, pub borderless: bool, pub fullscreen_type: FullscreenType, pub vsync: bool, pub min_width: u32, pub min_height: u32, pub max_width: u32, pub max_height: u32, }
A builder structure containing window settings
that can be set at runtime and changed with graphics::set_mode()
Defaults:
WindowMode { width: 800, height: 600, borderless: false, fullscreen_type: FullscreenType::Off, vsync: true, min_width: 0, max_width: 0, min_height: 0, max_height: 0, }
Fields
width: u32
Window width
height: u32
Window height
borderless: bool
Whether or not to show window decorations
fullscreen_type: FullscreenType
Fullscreen type
vsync: bool
Whether or not to enable vsync
min_width: u32
Minimum width for resizable windows; 0 means no limit
min_height: u32
Minimum height for resizable windows; 0 means no limit
max_width: u32
Maximum width for resizable windows; 0 means no limit
max_height: u32
Maximum height for resizable windows; 0 means no limit
Methods
impl WindowMode
[src]
impl WindowMode
pub fn borderless(self, borderless: bool) -> Self
[src]
pub fn borderless(self, borderless: bool) -> Self
Set borderless
pub fn fullscreen_type(self, fullscreen_type: FullscreenType) -> Self
[src]
pub fn fullscreen_type(self, fullscreen_type: FullscreenType) -> Self
Set the fullscreen type
pub fn vsync(self, vsync: bool) -> Self
[src]
pub fn vsync(self, vsync: bool) -> Self
Set vsync
pub fn dimensions(self, width: u32, height: u32) -> Self
[src]
pub fn dimensions(self, width: u32, height: u32) -> Self
Set default window size, or screen resolution in fullscreen mode
pub fn min_dimensions(self, width: u32, height: u32) -> Self
[src]
pub fn min_dimensions(self, width: u32, height: u32) -> Self
Set minimum window dimensions for windowed mode
pub fn max_dimensions(self, width: u32, height: u32) -> Self
[src]
pub fn max_dimensions(self, width: u32, height: u32) -> Self
Set maximum window dimensions for windowed mode
Trait Implementations
impl Debug for WindowMode
[src]
impl Debug for WindowMode
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 Copy for WindowMode
[src]
impl Copy for WindowMode
impl Clone for WindowMode
[src]
impl Clone for WindowMode
fn clone(&self) -> WindowMode
[src]
fn clone(&self) -> WindowMode
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 WindowMode
[src]
impl Default for WindowMode
fn default() -> Self
[src]
fn default() -> Self
Return WindowMode { width: 800, height: 600, borderless: false, fullscreen_type: FullscreenType::Off, vsync: true, min_width: 0, min_height: 0, max_width: 0, max_height: 0 }
impl PartialEq for WindowMode
[src]
impl PartialEq for WindowMode
fn eq(&self, other: &WindowMode) -> bool
[src]
fn eq(&self, other: &WindowMode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &WindowMode) -> bool
[src]
fn ne(&self, other: &WindowMode) -> bool
This method tests for !=
.
impl Eq for WindowMode
[src]
impl Eq for WindowMode
Auto Trait Implementations
impl Send for WindowMode
impl Send for WindowMode
impl Sync for WindowMode
impl Sync for WindowMode