pub struct WindowConfig {Show 14 fields
pub title: String,
pub width: u32,
pub height: u32,
pub resizable: bool,
pub fullscreen: bool,
pub visible: bool,
pub min_size: Option<(u32, u32)>,
pub max_size: Option<(u32, u32)>,
pub vsync: bool,
pub msaa_samples: u32,
pub high_dpi: bool,
pub icon_path: Option<String>,
pub target_fps: u32,
pub clear_color: Color,
}Expand description
Window configuration builder.
Use Game::new() to create one, then chain methods to configure.
Fields§
§title: StringWindow title.
width: u32Window width in pixels.
height: u32Window height in pixels.
resizable: boolWhether the window is resizable.
fullscreen: boolWhether to start in fullscreen.
visible: boolWhether to show the window (can start hidden).
min_size: Option<(u32, u32)>Minimum window size.
max_size: Option<(u32, u32)>Maximum window size.
vsync: boolWhether to enable vsync.
msaa_samples: u32MSAA sample count (0 = disabled).
high_dpi: boolHigh-DPI / retina support.
icon_path: Option<String>Icon path (set after window creation).
target_fps: u32Target FPS cap (0 = unlimited).
clear_color: ColorBackground color when the window is cleared.
Trait Implementations§
Source§impl Clone for WindowConfig
impl Clone for WindowConfig
Source§fn clone(&self) -> WindowConfig
fn clone(&self) -> WindowConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowConfig
impl Debug for WindowConfig
Auto Trait Implementations§
impl Freeze for WindowConfig
impl RefUnwindSafe for WindowConfig
impl Send for WindowConfig
impl Sync for WindowConfig
impl Unpin for WindowConfig
impl UnsafeUnpin for WindowConfig
impl UnwindSafe for WindowConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more