Class FileDialog
A file or folder picker.
Assembly: Dalamud.dll
View Source
public class FileDialog
Fields
WindowFlags
The flags used to draw the file picker window.
View Source
public ImGuiWindowFlags WindowFlags
Methods
Show()
Shows the dialog.
View Source
public void Show()
Hide()
Hides the dialog.
View Source
public void Hide()
GetIsOk()
Gets whether a file or folder was successfully selected.
View Source
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.
View Source
public List<string> GetResults()
Returns
System.Collections.Generic.List<System.String>
: The list of selected paths.### GetCurrentPath()
Gets the current path of the dialog.
View Source
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.
View Source
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.
View Source
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.
View Source
public bool Draw()
Returns
System.Boolean
: Whether a selection or cancel action was performed.## Events
SortOrderChanged
Fired whenever the sorting field changes.
View Source
public event Action<FileDialog.SortingField>? SortOrderChanged
Event Type
System.Action<Dalamud.Interface.ImGuiFileDialog.FileDialog.SortingField>