From f1ab4e564ea83540e513e1266c87e31c0eedf073 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 31 Jan 2025 19:35:46 +0500 Subject: upd: using nativefiledialog-extended instead of previous one --- src/editor.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/editor.c') 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")) { -- cgit v1.2.3