FilePicker additions (#798)

This commit is contained in:
Ottermandias 2022-04-18 01:25:00 +02:00 committed by GitHub
parent c4343d0976
commit 2becb12855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 12 deletions

View file

@ -115,8 +115,9 @@ namespace Dalamud.Interface.ImGuiFileDialog
/// <summary>
/// Gets the result of the selection.
/// </summary>
/// <returns>The result of the selection (file or folder path). If multiple entries were selected, they are separated with commas.</returns>
public string GetResult()
/// <param name="separator">The separator to put between multiple selected entries.</param>
/// <returns>The result of the selection (file or folder path). If multiple entries were selected, they are separated with the given separator, which is a comma by default.</returns>
public string GetResult(char separator = ',')
{
if (!this.flags.HasFlag(ImGuiFileDialogFlags.SelectOnly))
{
@ -129,7 +130,7 @@ namespace Dalamud.Interface.ImGuiFileDialog
}
var fullPaths = this.selectedFileNames.Where(x => !string.IsNullOrEmpty(x)).Select(x => Path.Combine(this.currentPath, x));
return string.Join(",", fullPaths.ToArray());
return string.Join(separator, fullPaths.ToArray());
}
/// <summary>