@@ 6,8 6,45 @@
* See LICENSE for licensing information.
*/
-use bevy::{app::App, DefaultPlugins};
+use bevy::{
+ app::{App, PluginGroup},
+ window::{
+ CompositeAlphaMode, CursorGrabMode, MonitorSelection, PresentMode, WindowDescriptor,
+ WindowMode, WindowPlugin, WindowPosition, WindowResizeConstraints,
+ },
+ DefaultPlugins,
+};
fn main() {
- App::new().add_plugins(DefaultPlugins).run();
+ let mut app = App::new();
+
+ app.add_plugins(DefaultPlugins.set(WindowPlugin {
+ window: WindowDescriptor {
+ width: 1280.,
+ height: 720.,
+ position: WindowPosition::Centered,
+ monitor: MonitorSelection::Primary,
+ resize_constraints: WindowResizeConstraints {
+ min_width: 1280.,
+ min_height: 720.,
+ max_width: 3840.,
+ max_height: 2160.,
+ },
+ scale_factor_override: Some(1.),
+ title: "Deck Builder".to_string(),
+ present_mode: PresentMode::Fifo,
+ resizable: true,
+ decorations: true,
+ cursor_visible: true,
+ cursor_grab_mode: CursorGrabMode::None,
+ mode: WindowMode::Windowed,
+ transparent: false,
+ canvas: None,
+ fit_canvas_to_parent: false,
+ alpha_mode: CompositeAlphaMode::Auto,
+ },
+ ..Default::default()
+ }));
+
+ app.run();
}