mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 04:25:00 +01:00
Center window on startup
This commit is contained in:
parent
d5c9e24201
commit
98d3634455
3 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue