You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the file widget is built against the SDL backend (nuklear_console_file_system.h), file browsing today still goes through the in-widget list view. SDL3 ships a native picker API — SDL_ShowOpenFileDialog() (plus SDL_ShowSaveFileDialog() and SDL_ShowOpenFolderDialog()) — that hands off to the platform's real file chooser. Using it would feel more native on Linux/macOS/Windows and would also resolve the keyboard/gamepad navigation edge cases the in-widget browser carries.
Add an opt-in macro NK_CONSOLE_FILE_SDL_NATIVE_DIALOG (default off to preserve current behavior) gated by NK_CONSOLE_ENABLE_SDL3 / equivalent.
When set, nk_console_file / nk_console_dir / nk_console_file_action skip the in-widget list view; on activation, they call SDL_ShowOpenFileDialog (or SDL_ShowOpenFolderDialog for dir, SDL_ShowSaveFileDialog for the save-action variant).
Wire the SDL_DialogFileCallback to copy the chosen path into the existing file-path buffer and fire NK_CONSOLE_EVENT_CHANGED.
Route any nk_console_file_set_filter extensions (File: Extension Filter #175) through SDL_DialogFileFilter[] so the native dialog honors the same filter spec.
Document the new macro in the README Configuration table.
QA
demo/sdl3_renderer with the macro enabled opens the platform's native file picker on click.
With the macro unset, the existing in-widget browser still works (no behavior change for current users).
Save-action variant returns a path even when the chosen filename doesn't yet exist on disk.
When the file widget is built against the SDL backend (
nuklear_console_file_system.h), file browsing today still goes through the in-widget list view. SDL3 ships a native picker API —SDL_ShowOpenFileDialog()(plusSDL_ShowSaveFileDialog()andSDL_ShowOpenFolderDialog()) — that hands off to the platform's real file chooser. Using it would feel more native on Linux/macOS/Windows and would also resolve the keyboard/gamepad navigation edge cases the in-widget browser carries.Refs:
Suggested Implementation
NK_CONSOLE_FILE_SDL_NATIVE_DIALOG(default off to preserve current behavior) gated byNK_CONSOLE_ENABLE_SDL3/ equivalent.nk_console_file/nk_console_dir/nk_console_file_actionskip the in-widget list view; on activation, they callSDL_ShowOpenFileDialog(orSDL_ShowOpenFolderDialogfor dir,SDL_ShowSaveFileDialogfor the save-action variant).NK_CONSOLE_EVENT_CHANGED.nk_console_file_set_filterextensions (File: Extension Filter #175) throughSDL_DialogFileFilter[]so the native dialog honors the same filter spec.QA
demo/sdl3_rendererwith the macro enabled opens the platform's native file picker on click.