Native file dialogs support WIP (SpartanJ/ecode#653).

This commit is contained in:
Martín Lucas Golini
2025-09-18 23:20:16 -03:00
parent aa3eea5810
commit dfd47dd1e3
13 changed files with 2205 additions and 39 deletions

View File

@@ -1836,7 +1836,10 @@ void DebuggerPlugin::resolveInputsBeforeRun(
} );
} else if ( input.type == "pickfile" ) {
UIFileDialog* dialog = UIFileDialog::New(
UIFileDialog::DefaultFlags, "*", getPluginContext()->getDefaultFileDialogFolder() );
UIFileDialog::DefaultFlags | ( getPluginContext()->getConfig().ui.nativeFileDialogs
? UIFileDialog::UseNativeFileDialog
: 0 ),
"*", getPluginContext()->getDefaultFileDialogFolder() );
dialog->setWindowFlags( UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL );
dialog->setTitle( i18n( "open_file", "Open File" ) );
dialog->setCloseShortcut( KEY_ESCAPE );