Fix awkward mouse conflict issues between egui and the engine
This commit is contained in:
parent
f5a16213fa
commit
8041c7e01d
6 changed files with 53 additions and 4 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use std::cell::Cell;
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
use std::sync::{Arc, Mutex, RwLock};
|
||||
use winit::event::Event;
|
||||
|
|
@ -15,6 +16,9 @@ pub struct PlatformContext {
|
|||
pub window: Arc<Mutex<winit::window::Window>>,
|
||||
pub egui_queue: Rc<RefCell<EguiQueue>>,
|
||||
pub settings: Arc<RwLock<Settings>>,
|
||||
/// Sets whether or not egui will receive input events.
|
||||
/// Added to prevent the mouse state conflict between the engine and egui.
|
||||
pub should_egui_receive_input_events: Rc<Cell<bool>>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue