Struct speedy2d::window::WindowCreationOptions
source · pub struct WindowCreationOptions { /* private fields */ }
Expand description
Options used during the creation of a window.
Implementations§
source§impl WindowCreationOptions
impl WindowCreationOptions
sourcepub fn new_windowed(size: WindowSize, position: Option<WindowPosition>) -> Self
pub fn new_windowed(size: WindowSize, position: Option<WindowPosition>) -> Self
Instantiates a new WindowCreationOptions
structure with the default
options, in non-fullscreen mode.
sourcepub fn new_fullscreen_borderless() -> Self
pub fn new_fullscreen_borderless() -> Self
Instantiates a new WindowCreationOptions
structure with the default
options, in borderless fullscreen mode.
sourcepub fn with_multisampling(self, multisampling: u16) -> Self
pub fn with_multisampling(self, multisampling: u16) -> Self
Sets the maximum level of multisampling which will be applied. By
default this is set to 16
.
Note that this depends on platform support, and setting this may have no effect.
sourcepub fn with_vsync(self, vsync: bool) -> Self
pub fn with_vsync(self, vsync: bool) -> Self
Sets whether or not vsync should be enabled. This can increase latency,
but should eliminate tearing. By default this is set to true
.
Note that this depends on platform support, and setting this may have no effect.
sourcepub fn with_resizable(self, resizable: bool) -> Self
pub fn with_resizable(self, resizable: bool) -> Self
Sets whether or not the window can be resized by the user. The default
is true
.
sourcepub fn with_always_on_top(self, always_on_top: bool) -> Self
pub fn with_always_on_top(self, always_on_top: bool) -> Self
If set to true
, the window will be placed above other windows. The
default is false
.
sourcepub fn with_maximized(self, maximized: bool) -> Self
pub fn with_maximized(self, maximized: bool) -> Self
If set to true
, the window will be initially maximized. The default is
false
.
sourcepub fn with_decorations(self, decorations: bool) -> Self
pub fn with_decorations(self, decorations: bool) -> Self
If set to false
, the window will have no border. The default is
true
.
sourcepub fn with_transparent(self, transparent: bool) -> Self
pub fn with_transparent(self, transparent: bool) -> Self
Sets whether the background of the window should be transparent. The
default is false
.
Note that this depends on platform support, and setting this may have no effect.
Trait Implementations§
source§impl Clone for WindowCreationOptions
impl Clone for WindowCreationOptions
source§fn clone(&self) -> WindowCreationOptions
fn clone(&self) -> WindowCreationOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WindowCreationOptions
impl Debug for WindowCreationOptions
source§impl PartialEq for WindowCreationOptions
impl PartialEq for WindowCreationOptions
source§fn eq(&self, other: &WindowCreationOptions) -> bool
fn eq(&self, other: &WindowCreationOptions) -> bool
self
and other
values to be equal, and is used
by ==
.