I recently contributed HTML5 save/export functionality to @ross.grams excellent Defold Polygon Editor tool. The next missing piece is to add load functionality for the template image, and for this I have created a FileDrop API extension.
The FileDrop extension will generate events on drag over/out and on drop so that you can get the name of the file that was dropped and its contents. This can be used to drag an image to the HTML5 version of the Defold Polygon Editor mentioned above for instance. I haven’t added a PR for this yet, but here’s a stand-alone demo:
Drag and drop a .txt or .png file to display it.
Next up for this extension is to add support for desktop platforms as well.
One thing that struck me while creating this extension is that we are starting to collect a really nice suite of good Defold extensions that can be used for tool and application development in Defold:
- DefOS for additional window handling functions
- DefDiags for native save and load dialogs
- DefMnu for native menus
- Defold-LFS for extra file system functions
- Dear ImGUI for advanced interface creation