Skip to content

Commit

Permalink
Merge pull request #106 from dlight/window-settings-maximized
Browse files Browse the repository at this point in the history
Add maximized option to `WindowSettings`
  • Loading branch information
hecrj authored Oct 12, 2019
2 parents dc0123a + 8e2da7b commit e1bb429
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ fn main() -> Result<()> {
size: (1280, 1024),
resizable: true,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/gamepad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/particles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/rectangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fn main() -> coffee::Result<()> {
size: (1280, 1024),
resizable: true,
fullscreen: false,
maximized: false,
})
}

Expand Down
1 change: 1 addition & 0 deletions examples/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fn main() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down
4 changes: 4 additions & 0 deletions src/graphics/window/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub struct Settings {

/// Defines whether or not the window should start in fullscreen mode.
pub fullscreen: bool,

/// Defines whether or not the window should start maximized.
pub maximized: bool,
}

impl Settings {
Expand All @@ -35,5 +38,6 @@ impl Settings {
})
.with_resizable(self.resizable)
.with_fullscreen(monitor)
.with_maximized(self.maximized)
}
}
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
//! size: (1280, 1024),
//! resizable: true,
//! fullscreen: false,
//! maximized: false,
//! })
//! }
//!
Expand Down
1 change: 1 addition & 0 deletions tests/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fn graphics() -> Result<()> {
size: (1280, 1024),
resizable: false,
fullscreen: false,
maximized: false,
})
}

Expand Down

0 comments on commit e1bb429

Please sign in to comment.