Struct piston::window::WindowSettings
[−]
[src]
pub struct WindowSettings { // some fields omitted }
Settings for window behavior.
Methods
impl WindowSettings
fn new<T, S>(title: T, size: S) -> WindowSettings where S: Into<Size>, T: Into<String>
Creates window settings with defaults. - samples: 0 - fullscreen: false - exit_on_esc: false
fn build<W>(self) -> Result<W, String> where W: BuildFromWindowSettings
Builds window.
fn get_title(&self) -> String
Gets title.
fn title(self, value: String) -> WindowSettings
Sets title.
fn get_size(&self) -> Size
Gets size.
fn size(self, value: Size) -> WindowSettings
Sets size.
fn get_fullscreen(&self) -> bool
Gets fullscreen.
fn fullscreen(self, value: bool) -> WindowSettings
Sets fullscreen.
fn get_exit_on_esc(&self) -> bool
Gets exit on esc.
fn exit_on_esc(self, value: bool) -> WindowSettings
Sets exit on esc.
fn get_samples(&self) -> u8
Gets samples.
fn samples(self, value: u8) -> WindowSettings
Sets samples.
fn get_vsync(&self) -> bool
Gets vsync.
fn vsync(self, value: bool) -> WindowSettings
Sets vsync.
fn get_maybe_opengl(&self) -> Option<OpenGL>
Gets opengl.
fn maybe_opengl(self, value: Option<OpenGL>) -> WindowSettings
Sets opengl.
fn opengl(self, value: OpenGL) -> WindowSettings
Sets opengl.