Super simple Defold library for accessing native save and open dialogs (using LuaJit FFI).
-
Add this library as a dependency in your Defold project. Pick one of the release Zip file URLs from: https://github.com/andsve/defold-dialogs/releases
-
Currently you need to copy the
native_libs
folder supplied in the library to the root of your project. -
In your script, add;
local dialogs = require "dialogs/dialogs"
. -
When you want to show a dialog, call:
- Show an open dialog:
print(dialogs.open(".txt,.lua", "c:/PathToDefaultDirectory"))
- Show an save dialog:
print(dialogs.save(".txt,.lua", "c:/PathToDefaultDirectory"))
- Only works on Windows (32bit) and OSX (32bit+64bit) for now.
0.9 - 2016-12-19
- Initial release, Win32 and OSX support.
Uses the fantastic mlabbe/nativefiledialog as precompiled dynamic libraries, see dialogs/native_libs
.