Added drag and drop file support#61
Conversation
|
Thank you, and sorry for the delay in reviewing this! It looks good to me, but it needs reformatting using It also looks like there are some problems building for WebAssembly, which doesn't use Glutin for windowing. To run the checks locally, see the "precommit" section of the justfile: https://github.com/QuantumBadger/Speedy2D/blob/master/justfile |
|
I made the changes so the file state is no longer stored in the window helper. This commit pass the CI test except for the build ones (I'm not working on Linux so the automated test aren't working) |
|
Thanks! I've pushed a commit that fixes the build. Before I merge this in, I'm going to need to think about how this API will work for WebAssembly in future. In that case we won't have a file "path", but I guess some binary data instead. So before I can integrate this I may need to make it more generic. |
I introduce the
glutin::event::WindowEvent::{DroppedFile, HoveredFile, HoveredFileCancelled}into speedy2d.I added a new method:
on_file_dragto theWindowHandlertrait.