remove default window attrs (oops)
This commit is contained in:
@@ -7,7 +7,7 @@ use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
use winit::event::{Ime, WindowEvent};
|
||||
use winit::event_loop::{ActiveEventLoop, EventLoopProxy};
|
||||
use winit::window::Window;
|
||||
use winit::window::{Window, WindowAttributes};
|
||||
|
||||
mod app;
|
||||
pub mod attr;
|
||||
@@ -39,6 +39,9 @@ pub trait DefaultUiState: 'static {
|
||||
fn exit(&mut self) {}
|
||||
#[allow(unused_variables)]
|
||||
fn window_event(&mut self, event: WindowEvent) {}
|
||||
fn window_attrs() -> WindowAttributes {
|
||||
WindowAttributes::default()
|
||||
}
|
||||
}
|
||||
|
||||
impl<State: DefaultUiState> UiState for State {
|
||||
@@ -47,8 +50,8 @@ impl<State: DefaultUiState> UiState for State {
|
||||
fn new(event_loop: &ActiveEventLoop, proxy: EventLoopProxy<Self::Event>) -> Self {
|
||||
let window = Arc::new(
|
||||
event_loop
|
||||
.create_window(Window::default_attributes().with_title("OPENWORM"))
|
||||
.unwrap(),
|
||||
.create_window(Self::window_attrs())
|
||||
.expect("failed to create window "),
|
||||
);
|
||||
let ui = DefaultUi {
|
||||
renderer: UiRenderer::new(window.clone()),
|
||||
|
||||
Reference in New Issue
Block a user