pub trait WindowExt {
// Required methods
fn try_center(&mut self) -> bool;
fn try_center_on_monitor(&mut self, monitor: &Monitor) -> bool;
}
Expand description
Extension methods for glfw::Window
.
Required Methods§
sourcefn try_center(&mut self) -> bool
fn try_center(&mut self) -> bool
Center the window on the dominant monitor,
If the window is 20% on monitor A and 80% on monitor B, then the window is centered onto monitor B
Returns false
if the window could not be
centered.
sourcefn try_center_on_monitor(&mut self, monitor: &Monitor) -> bool
fn try_center_on_monitor(&mut self, monitor: &Monitor) -> bool
Center the window on the primary monitor.
Returns false
if the window could not be
centered.