Class FileDialog
A file or folder picker.
Inheritance
Inherited Members
Namespace: Dalamud.Interface.ImGuiFileDialog
Assembly: Dalamud.dll
Syntax
public class FileDialog
Constructors
| Improve this Doc View SourceFileDialog(String, String, String, String, String, String, Int32, Boolean, ImGuiFileDialogFlags)
Initializes a new instance of the FileDialog class.
Declaration
public FileDialog(string id, string title, string filters, string path, string defaultFileName, string defaultExtension, int selectionCountMax, bool isModal, ImGuiFileDialogFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | A unique id for the dialog. |
| System.String | title | The text which is shown at the top of the dialog. |
| System.String | filters | Which file extension filters to apply. This should be left blank to select directories. |
| System.String | path | The directory which the dialog should start inside of. |
| System.String | defaultFileName | The default file or directory name. |
| System.String | defaultExtension | The default extension when creating new files. |
| System.Int32 | selectionCountMax | The maximum amount of files or directories which can be selected. Set to 0 for an infinite number. |
| System.Boolean | isModal | Whether the dialog should be a modal popup. |
| ImGuiFileDialogFlags | flags | Settings flags for the dialog, see ImGuiFileDialogFlags. |
Fields
| Improve this Doc View SourceWindowFlags
The flags used to draw the file picker window.
Declaration
public ImGuiWindowFlags WindowFlags
Field Value
| Type | Description |
|---|---|
| ImGuiWindowFlags |
Methods
| Improve this Doc View SourceDraw()
Draws the dialog.
Declaration
public bool Draw()
Returns
| Type | Description |
|---|---|
| System.Boolean | Whether a selection or cancel action was performed. |
GetCurrentPath()
Gets the current path of the dialog.
Declaration
public string GetCurrentPath()
Returns
| Type | Description |
|---|---|
| System.String | The path of the directory which the dialog is current viewing. |
GetIsOk()
Gets whether a file or folder was successfully selected.
Declaration
public bool GetIsOk()
Returns
| Type | Description |
|---|---|
| System.Boolean | The success state. Will be false if the selection was canceled or was otherwise unsuccessful. |
GetResult()
Gets the result of the selection.
Declaration
[Obsolete("Use GetResults() instead.", true)]
public string GetResult()
Returns
| Type | Description |
|---|---|
| System.String | The result of the selection (file or folder path). If multiple entries were selected, they are separated with commas. |
GetResults()
Gets the result of the selection.
Declaration
public List<string> GetResults()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> | The list of selected paths. |
Hide()
Hides the dialog.
Declaration
public void Hide()
SetQuickAccess(String, String, FontAwesomeIcon, Int32)
Set or remove a quick access folder for the navigation panel.
Declaration
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. |
| 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. |
Show()
Shows the dialog.
Declaration
public void Show()