mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-26 03:36:32 +11:00
with_monitor -> with_fullscreen
This commit is contained in:
parent
8c074af9fc
commit
bfc5d3e63d
2 changed files with 7 additions and 2 deletions
|
@ -23,7 +23,7 @@ fn main() {
|
||||||
|
|
||||||
let window = init::WindowBuilder::new()
|
let window = init::WindowBuilder::new()
|
||||||
.with_title("Hello world!".to_string())
|
.with_title("Hello world!".to_string())
|
||||||
.with_monitor(monitor)
|
.with_fullscreen(monitor)
|
||||||
.build()
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
|
@ -43,17 +43,22 @@ impl WindowBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Requests the window to be of specific dimensions.
|
||||||
|
///
|
||||||
|
/// Width and height are in pixels.
|
||||||
pub fn with_dimensions(mut self, width: uint, height: uint) -> WindowBuilder {
|
pub fn with_dimensions(mut self, width: uint, height: uint) -> WindowBuilder {
|
||||||
self.dimensions = (width, height);
|
self.dimensions = (width, height);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Requests a specific title for the window.
|
||||||
pub fn with_title(mut self, title: String) -> WindowBuilder {
|
pub fn with_title(mut self, title: String) -> WindowBuilder {
|
||||||
self.title = title;
|
self.title = title;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_monitor(mut self, monitor: MonitorID) -> WindowBuilder {
|
/// Requests fullscreen mode.
|
||||||
|
pub fn with_fullscreen(mut self, monitor: MonitorID) -> WindowBuilder {
|
||||||
let MonitorID(monitor) = monitor;
|
let MonitorID(monitor) = monitor;
|
||||||
self.monitor = Some(monitor);
|
self.monitor = Some(monitor);
|
||||||
self
|
self
|
||||||
|
|
Loading…
Add table
Reference in a new issue