RobLoach / RobLoach/nuklear_console

file: add Win32 native IFileDialog support

Open
#266 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
22
Forks
4
Avg merge
4m
Merged PRs (30d)
2

Description

PR #220 added NK_CONSOLE_FILE_SDL_NATIVE_DIALOG for SDL backends. There is no equivalent for Windows builds not using SDL (e.g. direct Win32 + OpenGL). Windows has IFileDialog (Vista+), which is the modern replacement for GetOpenFileName.

Suggested Implementation

Add a NK_CONSOLE_FILE_WIN32_NATIVE_DIALOG guard in nuklear_console_file.h. When defined and _WIN32 is set, call CoCreateInstance(CLSID_FileOpenDialog) in place of the tinydir file browser, mirroring the SDL branch structure.

QA

On Windows with NK_CONSOLE_FILE_WIN32_NATIVE_DIALOG defined, activating the file widget opens the native Windows file picker instead of the in-console browser.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in nuklear_console_file.h and compare the existing NK_CONSOLE_FILE_SDL_NATIVE_DIALOG branch with the tinydir file-browser path. Trace the file widget activation flow and the requested CoCreateInstance(CLSID_FileOpenDialog) integration under _WIN32 and the new guard. Done means a Windows build with NK_CONSOLE_FILE_WIN32_NATIVE_DIALOG opens the native file picker instead of the in-console browser.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.