Super simple Defold library for accessing native save and open dialogs (using LuaJit FFI).
Lua
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dialogs
input
main
.gitignore
README.md
game.project

README.md

defold-dialogs

Super simple Defold library for accessing native save and open dialogs (using LuaJit FFI).

Usage

  1. 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

  2. Currently you need to copy the native_libs folder supplied in the library to the root of your project.

  3. In your script, add; local dialogs = require "dialogs/dialogs".

  4. 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"))

Limitations

  • Only works on Windows (32bit) and OSX (32bit+64bit) for now.

Changelog

  • 0.9 - 2016-12-19 - Initial release, Win32 and OSX support.

Credits

Uses the fantastic mlabbe/nativefiledialog as precompiled dynamic libraries, see dialogs/native_libs.