Trait ren::prelude::WindowExt

source ·
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§

source

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.

source

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.

Implementors§