pub struct RaylibBuilder { /* private fields */ }Expand description
A builder that allows more customization of the game window shown to the user before the RaylibHandle is created.
Implementations§
Source§impl RaylibBuilder
impl RaylibBuilder
Sourcepub fn fullscreen(&mut self) -> &mut RaylibBuilder
pub fn fullscreen(&mut self) -> &mut RaylibBuilder
Sets the window to be fullscreen.
Sourcepub fn log_level(&mut self, level: TraceLogLevel) -> &mut RaylibBuilder
pub fn log_level(&mut self, level: TraceLogLevel) -> &mut RaylibBuilder
Set the builder’s log level.
Sourcepub fn resizable(&mut self) -> &mut RaylibBuilder
pub fn resizable(&mut self) -> &mut RaylibBuilder
Sets the window to be resizable.
Sourcepub fn undecorated(&mut self) -> &mut RaylibBuilder
pub fn undecorated(&mut self) -> &mut RaylibBuilder
Sets the window to be undecorated (without a border).
Sourcepub fn transparent(&mut self) -> &mut RaylibBuilder
pub fn transparent(&mut self) -> &mut RaylibBuilder
Sets the window to be transparent.
Sourcepub fn msaa_4x(&mut self) -> &mut RaylibBuilder
pub fn msaa_4x(&mut self) -> &mut RaylibBuilder
Hints that 4x MSAA (anti-aliasing) should be enabled. The system’s graphics drivers may override this setting.
Sourcepub fn vsync(&mut self) -> &mut RaylibBuilder
pub fn vsync(&mut self) -> &mut RaylibBuilder
Hints that vertical sync (VSync) should be enabled. The system’s graphics drivers may override this setting.
Sourcepub fn width(&mut self, w: i32) -> &mut RaylibBuilder
pub fn width(&mut self, w: i32) -> &mut RaylibBuilder
Sets the window’s width.
Sourcepub fn height(&mut self, h: i32) -> &mut RaylibBuilder
pub fn height(&mut self, h: i32) -> &mut RaylibBuilder
Sets the window’s height.
Sourcepub fn size(&mut self, w: i32, h: i32) -> &mut RaylibBuilder
pub fn size(&mut self, w: i32, h: i32) -> &mut RaylibBuilder
Sets the window’s width and height.
Sourcepub fn title(&mut self, text: &str) -> &mut RaylibBuilder
pub fn title(&mut self, text: &str) -> &mut RaylibBuilder
Sets the window title.
Sourcepub fn build(&self) -> (RaylibHandle, RaylibThread)
pub fn build(&self) -> (RaylibHandle, RaylibThread)
Builds and initializes a Raylib window.
§Panics
Attempting to initialize Raylib more than once will result in a panic.
Trait Implementations§
Source§impl Debug for RaylibBuilder
impl Debug for RaylibBuilder
Source§impl Default for RaylibBuilder
impl Default for RaylibBuilder
Source§fn default() -> RaylibBuilder
fn default() -> RaylibBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RaylibBuilder
impl RefUnwindSafe for RaylibBuilder
impl Send for RaylibBuilder
impl Sync for RaylibBuilder
impl Unpin for RaylibBuilder
impl UnsafeUnpin for RaylibBuilder
impl UnwindSafe for RaylibBuilder
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