Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 3m7s
23 lines
578 B
Rust
23 lines
578 B
Rust
use std::sync::Arc;
|
|
|
|
use bevy_ecs::resource::Resource;
|
|
use winit::{event_loop::EventLoopProxy, window::Window};
|
|
|
|
#[derive(Resource)]
|
|
pub struct EventLoopProxyWrapper<T: 'static>(EventLoopProxy<T>);
|
|
|
|
impl<T: 'static> EventLoopProxyWrapper<T> {
|
|
pub fn new(event_loop: EventLoopProxy<T>) -> Self {
|
|
Self(event_loop)
|
|
}
|
|
|
|
pub fn proxy(&self) -> &EventLoopProxy<T> {
|
|
&self.0
|
|
}
|
|
}
|
|
|
|
#[derive(Resource, Clone)]
|
|
pub struct DisplayHandleWrapper(pub winit::event_loop::OwnedDisplayHandle);
|
|
|
|
#[derive(Resource, Clone)]
|
|
pub struct WindowWrapper(pub Arc<Window>);
|