Class FileDialog
A file or folder picker.
Assembly: Dalamud.dll​
public class FileDialog
Fields​
WindowFlags​
The flags used to draw the file picker window.
public ImGuiWindowFlags WindowFlags
Methods​
Show()​
Shows the dialog.
public void Show()
Hide()​
Hides the dialog.
public void Hide()
GetIsOk()​
Gets whether a file or folder was successfully selected.
public bool GetIsOk()
Returns​
System.Boolean: The success state. Will be false if the selection was canceled or was otherwise unsuccessful.
GetResults()​
Gets the result of the selection.
public List<string> GetResults()
Returns​
System.Collections.Generic.List<System.String>: The list of selected paths.
GetCurrentPath()​
Gets the current path of the dialog.
public string GetCurrentPath()
Returns​
System.String: The path of the directory which the dialog is current viewing.
SetQuickAccess(string, string, FontAwesomeIcon, int)​
Set or remove a quick access folder for the navigation panel.
public void SetQuickAccess(string name, string path, FontAwesomeIcon icon, int position = -1)
Parameters​
| Type | Name | Description |
|---|---|---|
System.String | name | The displayed name of the folder. If this name already exists, it will be overwritten. |
System.String | path | The new linked path. If this is empty, no link will be added and existing links will be removed. |
| Dalamud.Interface.FontAwesomeIcon | icon | The FontAwesomeIcon-ID of the icon displayed before the name. |
System.Int32 | position | An optional position at which to insert the new link. If the link is updated, having this less than zero will keep its position. |
Otherwise, invalid indices will insert it at the end. |
SortFields(SortingField)​
Specify the current and subsequent sort order.
public void SortFields(FileDialog.SortingField sortingField)
Parameters​
| Type | Name | Description |
|---|---|---|
| Dalamud.Interface.ImGuiFileDialog.FileDialog.SortingField | sortingField | The new sort order. None is invalid and will not have any effect. |
Draw()​
Draws the dialog.
public bool Draw()
Returns​
System.Boolean: Whether a selection or cancel action was performed.
Events​
SelectionChanged​
Event which is fired when the user changes the selection of files or folders. The string parameter is the currently active path, which may be a file or a directory depending on the current selection and mode.
public event EventHandler<string>? SelectionChanged
Event Type​
System.EventHandler<System.String>
SortOrderChanged​
Fired whenever the sorting field changes.
public event Action<FileDialog.SortingField>? SortOrderChanged
Event Type​
System.Action<Dalamud.Interface.ImGuiFileDialog.FileDialog.SortingField>