diff options
author | FireForge <67974470+fire-forge@users.noreply.github.com> | 2022-07-04 16:26:26 -0500 |
---|---|---|
committer | FireForge <67974470+fire-forge@users.noreply.github.com> | 2022-07-09 10:51:45 -0500 |
commit | af19501cc71019add82a80bf150146f1d308892d (patch) | |
tree | 5c04d765c8a2b438159d058e9a86be55afa9f644 /doc/classes/FileDialog.xml | |
parent | d26442e709f6361af9ac755ec9291bb43f2cd69b (diff) |
Seperate filter and description in FileDialog.add_filter()
Diffstat (limited to 'doc/classes/FileDialog.xml')
-rw-r--r-- | doc/classes/FileDialog.xml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 903f36d0ce..f45031cea8 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -12,10 +12,11 @@ <method name="add_filter"> <return type="void" /> <argument index="0" name="filter" type="String" /> + <argument index="1" name="description" type="String" default="""" /> <description> - Adds [code]filter[/code] to the list of filters, which restricts what files can be picked. - A [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed. - Example filters: [code]"*.png ; PNG Images"[/code], [code]"project.godot ; Godot Project"[/code]. + Adds a comma-delimited file name [code]filter[/code] option to the [FileDialog] with an optional [code]description[/code], which restricts what files can be picked. + A [code]filter[/code] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed. + For example, a [code]filter[/code] of [code]"*.png, *.jpg"[/code] and a [code]description[/code] of [code]"Images"[/code] results in filter text "Images (*.png, *.jpg)". </description> </method> <method name="clear_filters"> |