-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for dropping files into window #1040
Comments
I'd like to double that notion. However I'd first like to figure out the exact API it would be accessible under. Option A:
Pros: Event can be delivered trough input handling system, meaning that it could be "taken" by an Interactive it was dropped on. Option B:
As everything with DX - it needs more work because hooks have to be manually implemented for winapi. Pretty sure I had some preliminary works on HL side to get that stuff working. But as long as we can get it working on 2 out of 3 targets it's good enough. (I.e. JS + SDL with DX being done Later™) |
There's also some handling that has to be done on the JS side, since there you will need the native event to get the actual data dropped into the app, compared to just getting the file path in SDL. I'm not sure what would be a good way to do that. So going with option B might be a good idea. The listener could return an an object like |
I think we need something more dynamic that "on file dropped", because we might want the app and the cursor to react to which kind of file is currently being hovered some part of the app. |
Would it be good if |
It would be cool to be able to drop files into a heaps app, and have an event for that.
So you can load files in apps easily.
SDL has the SDL_DropEvent, and for JS you can add a ondrop event onto the game canvas. Not sure about DirectX though.
The text was updated successfully, but these errors were encountered: