Added clap options to choose the renderer size

This commit is contained in:
2018-10-08 15:31:50 +02:00
parent 45d301361c
commit 0250e887d4
3 changed files with 49 additions and 5 deletions
+2 -2
View File
@@ -50,12 +50,12 @@ pub struct Renderer {
impl Renderer {
/// Creates a new renderer.
pub fn new(width: u32, height: u32) -> Renderer {
pub fn new(width: u32, height: u32, fullscreen: bool) -> Renderer {
let mut window = RenderWindow::new(
(width, height),
"Free Rusty Maker",
Style::CLOSE,
if fullscreen { Style::FULLSCREEN } else { Style::CLOSE },
&Default::default(),
);
window.set_vertical_sync_enabled(true);