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]
pub fn borderless(self, borderless: bool) -> Self[src]
Set borderless
pub fn fullscreen_type(self, fullscreen_type: FullscreenType) -> Self[src]
Set the fullscreen type
pub fn vsync(self, vsync: bool) -> Self[src]
Set vsync
pub fn dimensions(self, width: u32, height: u32) -> Self[src]
Set default window size, or screen resolution in fullscreen mode
pub fn min_dimensions(self, width: u32, height: u32) -> Self[src]
Set minimum window dimensions for windowed mode
pub fn max_dimensions(self, width: u32, height: u32) -> Self[src]
Set maximum window dimensions for windowed mode
Trait Implementations
impl Debug for WindowMode[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Copy for WindowMode[src]
impl Clone for WindowMode[src]
fn clone(&self) -> WindowMode[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Default for WindowMode[src]
fn default() -> Self[src]
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]
fn eq(&self, __arg_0: &WindowMode) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &WindowMode) -> bool[src]
This method tests for !=.