feat(): file_drop poc
This commit is contained in:
parent
ade1a59cf2
commit
cd0881578f
|
@ -40,6 +40,7 @@ fn main() {
|
||||||
.add_plugin(HelloPlugin)
|
.add_plugin(HelloPlugin)
|
||||||
.insert_resource(WinitSettings::desktop_app())
|
.insert_resource(WinitSettings::desktop_app())
|
||||||
.add_startup_system(setup)
|
.add_startup_system(setup)
|
||||||
|
.add_system(file_drop)
|
||||||
.add_system(button_system)
|
.add_system(button_system)
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
@ -51,6 +52,14 @@ fn hello_world(time: Res<Time>, mut timer: ResMut<GreetTimer>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn file_drop(mut dnd_evr: EventReader<FileDragAndDrop>) {
|
||||||
|
for ev in dnd_evr.iter() {
|
||||||
|
println!("{:?}", ev);
|
||||||
|
if let FileDragAndDrop::DroppedFile { window, path_buf } = ev {
|
||||||
|
println!("Dropped file with path: {:?} in window id: {:?}", path_buf, window);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const NORMAL_BUTTON: Color = Color::rgb(0.15, 0.15, 0.15);
|
const NORMAL_BUTTON: Color = Color::rgb(0.15, 0.15, 0.15);
|
||||||
const HOVERED_BUTTON: Color = Color::rgb(0.25, 0.25, 0.25);
|
const HOVERED_BUTTON: Color = Color::rgb(0.25, 0.25, 0.25);
|
||||||
|
|
Loading…
Reference in New Issue