Remove dropping files from emigui Input
This commit is contained in:
parent
025fae5586
commit
555d7aed20
3 changed files with 0 additions and 23 deletions
|
@ -29,12 +29,6 @@ pub struct RawInput {
|
|||
/// Local time. Only used for the clock in the example app.
|
||||
pub seconds_since_midnight: Option<f64>,
|
||||
|
||||
/// Files has been dropped into the window.
|
||||
pub dropped_files: Vec<std::path::PathBuf>,
|
||||
|
||||
/// Someone is threatening to drop these on us.
|
||||
pub hovered_files: Vec<std::path::PathBuf>,
|
||||
|
||||
/// In-order events received this frame
|
||||
pub events: Vec<Event>,
|
||||
|
||||
|
@ -65,12 +59,6 @@ pub struct GuiInput {
|
|||
/// Local time. Only used for the clock in the example app.
|
||||
pub seconds_since_midnight: Option<f64>,
|
||||
|
||||
/// Files has been dropped into the window.
|
||||
pub dropped_files: Vec<std::path::PathBuf>,
|
||||
|
||||
/// Someone is threatening to drop these on us.
|
||||
pub hovered_files: Vec<std::path::PathBuf>,
|
||||
|
||||
/// In-order events received this frame
|
||||
pub events: Vec<Event>,
|
||||
|
||||
|
@ -160,8 +148,6 @@ impl GuiInput {
|
|||
time: new.time,
|
||||
dt,
|
||||
seconds_since_midnight: new.seconds_since_midnight,
|
||||
dropped_files: new.dropped_files.clone(),
|
||||
hovered_files: new.hovered_files.clone(),
|
||||
events: new.events.clone(),
|
||||
web: new.web.clone(),
|
||||
}
|
||||
|
@ -202,8 +188,6 @@ impl RawInput {
|
|||
ui.add(label!("pixels_per_point: {:?}", self.pixels_per_point));
|
||||
ui.add(label!("time: {:.3} s", self.time));
|
||||
ui.add(label!("events: {:?}", self.events));
|
||||
ui.add(label!("dropped_files: {:?}", self.dropped_files));
|
||||
ui.add(label!("hovered_files: {:?}", self.hovered_files));
|
||||
if let Some(web) = &self.web {
|
||||
web.ui(ui);
|
||||
}
|
||||
|
@ -223,8 +207,6 @@ impl GuiInput {
|
|||
ui.add(label!("pixels_per_point: {}", self.pixels_per_point));
|
||||
ui.add(label!("time: {:.3} s", self.time));
|
||||
ui.add(label!("events: {:?}", self.events));
|
||||
ui.add(label!("dropped_files: {:?}", self.dropped_files));
|
||||
ui.add(label!("hovered_files: {:?}", self.hovered_files));
|
||||
if let Some(web) = &self.web {
|
||||
web.ui(ui);
|
||||
}
|
||||
|
|
|
@ -32,9 +32,6 @@ pub fn input_event(
|
|||
glutin::Event::WindowEvent { event, .. } => match event {
|
||||
CloseRequested | Destroyed => *running = false,
|
||||
|
||||
DroppedFile(path) => raw_input.dropped_files.push(path),
|
||||
HoveredFile(path) => raw_input.hovered_files.push(path),
|
||||
|
||||
Resized(glutin::dpi::LogicalSize { width, height }) => {
|
||||
raw_input.screen_size = vec2(width as f32, height as f32);
|
||||
}
|
||||
|
|
|
@ -100,8 +100,6 @@ fn main() {
|
|||
raw_input.time = start_time.elapsed().as_nanos() as f64 * 1e-9;
|
||||
raw_input.seconds_since_midnight = Some(emigui_glium::local_time_of_day());
|
||||
raw_input.scroll_delta = vec2(0.0, 0.0);
|
||||
raw_input.dropped_files.clear();
|
||||
raw_input.hovered_files.clear();
|
||||
raw_input.events.clear();
|
||||
events_loop.poll_events(|event| {
|
||||
emigui_glium::input_event(event, clipboard.as_mut(), &mut raw_input, &mut running)
|
||||
|
|
Loading…
Reference in a new issue