diff options
| author | ilotterytea <iltsu@alright.party> | 2025-01-31 19:35:46 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-01-31 19:35:46 +0500 |
| commit | f1ab4e564ea83540e513e1266c87e31c0eedf073 (patch) | |
| tree | 29849c9891a007409f9fafe91445f7d54c28db12 /src/editor.c | |
| parent | b4346a97eff6d73699bb5f1928ffada8dc16baed (diff) | |
upd: using nativefiledialog-extended instead of previous one
Diffstat (limited to 'src/editor.c')
| -rw-r--r-- | src/editor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/editor.c b/src/editor.c index 425dc64..c1d9463 100644 --- a/src/editor.c +++ b/src/editor.c @@ -236,8 +236,12 @@ void drawPreview(EditorCreateBlockState *state, int wx, int wy, int ww, int wh, } void loadTexture(EditorCreateBlockState *state) { - nfdchar_t *outPath = NULL; - nfdresult_t result = NFD_OpenDialog(NULL, NULL, &outPath); + nfdu8char_t *outPath; + nfdu8filteritem_t filters[1] = {{"Images", "png"}}; + nfdopendialogu8args_t args = {0}; + args.filterList = filters; + args.filterCount = 1; + nfdresult_t result = NFD_OpenDialogU8_With(&outPath, &args); if (result == NFD_OKAY) { if (!IsFileExtension(outPath, ".png")) { |
