Broken "Open" button in openFolderDialog with SDL, DX11

Expanding and utilizing the engine via C++.

Broken "Open" button in openFolderDialog with SDL, DX11

chriscalef
Posts: 328
Joined: Mon Feb 09, 2015 7:48 pm
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:

Code: Select all

function testFolderDialog(){   %dlg = new OpenFolderDialog()   {      DefaultPath    = "";      Filters        = "";   };      if(%dlg.Execute())   {      %path = %dlg.FileName;           echo("dialog executed! path = " @ %path);   } else {      echo("dialog failed to execute! path = " @ %path);   }   %dlg.delete();}

Re: Broken "Open" button in openFolderDialog with SDL, DX11

chriscalef
Posts: 328
Joined: Mon Feb 09, 2015 7:48 pm
Ah, fixed it! Turned out I was missing the following file from my build, not sure why it isn't there (in either my stock Torque build or my project build), but when I added it to the project, things got better:

platformWin32/nativeDialogs/fileDialog.cpp

Re: Broken "Open" button in openFolderDialog with SDL, DX11

JeffR
Steering Committee
Posts: 719
Joined: Tue Feb 03, 2015 9:49 pm

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.

Who is online

Users browsing this forum: No registered users and 3 guests