Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andsve/def-diags
https://github.com/andsve/def-diags
defold defold-library
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/andsve/def-diags
- Owner: andsve
- Created: 2017-08-05T08:16:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-23T10:28:53.000Z (about 3 years ago)
- Last Synced: 2024-11-02T14:33:49.545Z (about 2 months ago)
- Topics: defold, defold-library
- Language: C++
- Size: 30.3 KB
- Stars: 12
- Watchers: 4
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-defold - Def-Diags
README
## Def-Diags
Simpe cross-platform (OSX, Windows, Linux) native open and save dialogs for Defold.Uses zlib licensed [mlabbe/nativefiledialog](https://github.com/mlabbe/nativefiledialog) with some modifications (see `diags/src/mlabbe-nativefiledialog/changes.txt`).
### Usage
```Lua
-- Open file dialog
print("diags.open:", diags.open())-- Save file dialog
print("diags.save:", diags.save())-- Open multiple files
local r, t = diags.open_multiple()
print("diags.open_multiple:", r)
pprint(t)-- Open folder
print("diags.open_folder:", diags.open_folder())```
All functions take a default path as argument. `diags.open()`, `diags.save()` and `diags.open_multiple()` also takes a file extension filter as the first argument. Example:
```Lua
diags.open("png,jpg;psd", "/tmp/")
```
For more information see: https://github.com/mlabbe/nativefiledialog#file-filter-syntax