[−][src]Struct ggez::conf::WindowMode
A builder structure containing window settings
that can be set at runtime and changed with graphics::set_mode()
.
Defaults:
WindowMode { width: 800.0, height: 600.0, maximized: false, fullscreen_type: FullscreenType::Windowed, borderless: false, min_width: 0.0, max_width: 0.0, min_height: 0.0, max_height: 0.0, hidpi: false, resizable: false, }
Fields
width: f32
Window width
height: f32
Window height
maximized: bool
Whether or not to maximize the window
fullscreen_type: FullscreenType
Fullscreen type
borderless: bool
Whether or not to show window decorations
min_width: f32
Minimum width for resizable windows; 0 means no limit
min_height: f32
Minimum height for resizable windows; 0 means no limit
max_width: f32
Maximum width for resizable windows; 0 means no limit
max_height: f32
Maximum height for resizable windows; 0 means no limit
hidpi: bool
Whether or not to scale all "pixel" coordinates to deal with high DPI screens.
A very good overview of this is available in
the winit
docs.
If this is false (the default), one pixel in ggez equates to one
physical pixel on the screen. If it is true
, then ggez will
scale all pixel coordinates by the scaling factor returned by
graphics::get_hidpi_factor()
.
TODO: This is not implemented properly yet because winit is stubborn.
resizable: bool
Whether or not the window is resizable
Methods
impl WindowMode
[src]
pub fn dimensions(self, width: f32, height: f32) -> Self
[src]
Set default window size, or screen resolution in true fullscreen mode.
pub fn maximized(self, maximized: bool) -> Self
[src]
Set whether the window should be maximized.
pub fn fullscreen_type(self, fullscreen_type: FullscreenType) -> Self
[src]
Set the fullscreen type.
pub fn borderless(self, borderless: bool) -> Self
[src]
Set whether a window should be borderless in windowed mode.
pub fn min_dimensions(self, width: f32, height: f32) -> Self
[src]
Set minimum window dimensions for windowed mode.
pub fn max_dimensions(self, width: f32, height: f32) -> Self
[src]
Set maximum window dimensions for windowed mode.
pub fn resizable(self, resizable: bool) -> Self
[src]
Set resizable.
pub fn hidpi(self, hidpi: bool) -> Self
[src]
Sets whether or not to allow hidpi.
Trait Implementations
impl PartialEq<WindowMode> for WindowMode
[src]
fn eq(&self, other: &WindowMode) -> bool
[src]
fn ne(&self, other: &WindowMode) -> bool
[src]
impl Default for WindowMode
[src]
fn default() -> Self
[src]
Return WindowMode { width: 800.0, height: 600.0, maximized: false, fullscreen_type: FullscreenType :: Windowed, borderless: false, min_width: 0.0, min_height: 0.0, max_width: 0.0, max_height: 0.0, hidpi: false, resizable: false }
impl Clone for WindowMode
[src]
fn clone(&self) -> WindowMode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for WindowMode
[src]
impl Debug for WindowMode
[src]
impl Serialize for WindowMode
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for WindowMode
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for WindowMode
impl Sync for WindowMode
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Any + Debug,
[src]
T: Copy + PartialEq<T> + Any + Debug,
impl<T> Same for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.