Struct window::WindowSettings
[−]
[src]
pub struct WindowSettings { // some fields omitted }
Settings for window behavior.
Methods
impl WindowSettings
fn new<T: Into<String>, S: Into<Size>>(title: T, size: S) -> WindowSettings
Creates window settings with defaults.
- samples: 0
- fullscreen: false
- exit_on_esc: false
- vsync: false
- srgb: true
fn build<W: BuildFromWindowSettings>(self) -> Result<W, String>
Builds window.
fn get_title(&self) -> String
Gets title.
fn title(self, value: String) -> Self
Sets title.
fn get_size(&self) -> Size
Gets size.
fn size(self, value: Size) -> Self
Sets size.
fn get_fullscreen(&self) -> bool
Gets fullscreen.
fn fullscreen(self, value: bool) -> Self
Sets fullscreen.
fn get_exit_on_esc(&self) -> bool
Gets exit on esc.
fn exit_on_esc(self, value: bool) -> Self
Sets exit on esc.
fn get_samples(&self) -> u8
Gets samples.
fn samples(self, value: u8) -> Self
Sets samples.
See https://en.wikipedia.org/wiki/Multisample_anti-aliasing for more information.
fn get_vsync(&self) -> bool
Gets vsync.
See https://en.wikipedia.org/wiki/Screen_tearing for more information.
fn vsync(self, value: bool) -> Self
Sets vsync.
fn get_maybe_opengl(&self) -> Option<OpenGL>
Gets opengl.
fn maybe_opengl(self, value: Option<OpenGL>) -> Self
Sets opengl.
fn opengl(self, value: OpenGL) -> Self
Sets opengl.
fn get_srgb(&self) -> bool
Gets sRGB.
fn srgb(self, value: bool) -> Self
Sets sRGB.
See https://en.wikipedia.org/wiki/SRGB for more information.