Signal2
Signal support.
EditorFileDialog.swift:882class Signal2
Use the connect(flags:_:)
method to connect to the signal on the container object, and disconnect(_:)
to drop the connection.
You can also await the emitted
property for waiting for a single emission of the signal.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (24) members.
Types
enum Access
enum DisplayMode
enum FileMode
class Signal1
Signal support.
class Signal3
Signal support.
Type members
Instance members
var access: EditorFileDialog.Access
The location from which the user may select a file, including
res://
,user://
, and the local file system.var currentDir: String
The currently occupied directory.
var currentFile: String
The currently selected file.
var currentPath: String
The file system path in the address bar.
var dirSelected: Signal3
Emitted when a directory is selected.
var disableOverwriteWarning: Bool
If
true
, theEditorFileDialog
will not warn the user before overwriting files.var displayMode: EditorFileDialog.DisplayMode
The view format in which the
EditorFileDialog
displays resources to the user.var fileMode: EditorFileDialog.FileMode
The dialog’s open or save mode, which affects the selection behavior. See
FileMode
.var fileSelected: Signal1
Emitted when a file is selected.
var filesSelected: Signal2
Emitted when multiple files are selected.
var filters: PackedStringArray
The available file type filters. For example, this shows only
.png
and.gd
files:set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))
. Multiple file types can also be specified in a single filter."*.png, *.jpg, *.jpeg ; Supported Images"
will show both PNG and JPEG files when selected.var showHiddenFiles: Bool
If
true
, hidden files and directories will be visible in theEditorFileDialog
. This property is synchronized withEditorSettings/filesystem/fileDialog/showHiddenFiles
.func addFilter(String, description: String
) Adds a comma-delimited file name
filter
option to theEditorFileDialog
with an optionaldescription
, which restricts what files can be picked.func addSideMenu(Control?, title: String
) Adds the given
menu
to the side of the file dialog with the giventitle
text on top. Only one side menu is allowed.func clearFilters(
) Removes all filters except for “All Files (*)”.
func getLineEdit(
) -> LineEdit? Returns the LineEdit for the selected file.
func getVbox(
) -> VBoxContainer? Returns the
VBoxContainer
used to display the file system.func invalidate(
) Notify the
EditorFileDialog
that its view of the data is no longer accurate. Updates the view contents on next view update.
Citizens in SwiftGodot
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func connect(flags: Object.ConnectFlags, @escaping (_ paths: PackedStringArray) -> ()
) -> Object Connects the signal to the specified callback
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)