Center window on startup

This commit is contained in:
crumblingstatue 2023-04-01 15:07:58 +02:00
parent d5c9e24201
commit 98d3634455
3 changed files with 14 additions and 0 deletions

View file

@ -2,6 +2,7 @@ use sfml::{
graphics::RenderWindow,
window::{ContextSettings, Style, VideoMode},
};
use sfml_xt::graphics::RenderWindowExt;
struct ScreenRes {
w: u16,
@ -28,5 +29,6 @@ pub fn make_window() -> RenderWindow {
&ContextSettings::default(),
);
rw.set_framerate_limit(60);
rw.center();
rw
}