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