Fix awkward mouse conflict issues between egui and the engine

This commit is contained in:
reo 2025-12-13 18:23:52 +03:00
parent f5a16213fa
commit 8041c7e01d
6 changed files with 53 additions and 4 deletions

View file

@ -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)]