Jump to content

Broken "Open" button in openFolderDialog with SDL, DX11


Recommended Posts

Well this is one that probably doesn't get a lot of testing, but it seems to have broken at around the time I went to SDL and DirectX11, and I've tested it on a stock build and it's broken there as well. The symptom is: when you call openFolderDialog in order to get a folder name from the user, the dialog works fine, the Cancel button works fine, but the Open button does nothing at all. Anybody got any quick ideas how to fix this? It's causing major last minute problems in my otherwise pretty functional build. :(

You can test it easily with the following script function:


function testFolderDialog()
  %dlg = new OpenFolderDialog()
     DefaultPath    = "";
     Filters        = "";

     %path = %dlg.FileName;     
     echo("dialog executed! path = " @ %path);
  } else {
     echo("dialog failed to execute! path = " @ %path);

Link to comment
Share on other sites

Well, that's for the windows-only method. The NativeFileDialogs lib handles the cross-platform file dialog action when using SDL.

That said, hadn't thought of folder selection, and looking at it, the NFD lib may not support it out of the box. I'll look into dealing with that, but for now your workaround should be fine, if only for windows currently.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...