EditorFileDialog¶
Inherits: ConfirmationDialog < AcceptDialog < WindowDialog < Popup < Control < CanvasItem < Node < Object
类别: 核心
简要说明¶
属性¶
0 |
||
“答复:/” |
||
“ |
||
“答复:/” |
||
假 |
||
0 |
||
4 |
||
假 |
方法¶
无效 |
add_filter ( String filter ) |
无效 |
clear_filters ( ) |
get_vbox ( ) |
|
无效 |
invalidate ( ) |
信号¶
dir_selected ( String dir )
选择目录时发出。
file_selected ( String path )
选定文件时发出。
files_selected ( PoolStringArray paths )
选择多个文件时发出。
枚举¶
枚举 Mode :
MODE_OPEN_FILE = 0 ---
EditorFileDialog
只能选择一个文件。接受窗口将打开文件。MODE_OPEN_FILES = 1 ---
EditorFileDialog
可以选择多个文件。接受窗口将打开所有文件。MODE_OPEN_DIR = 2 ---
EditorFileDialog
只能选择一个目录。接受窗口将打开目录。MODE_OPEN_ANY = 3 ---
EditorFileDialog
可以选择文件或目录。接受窗口将打开它。MODE_SAVE_FILE = 4 ---
EditorFileDialog
只能选择一个文件。接受窗口将保存文件。
枚举 通路 :
ACCESS_RESOURCES = 0 ---
EditorFileDialog
只能查看res://
目录内容。ACCESS_USERDATA = 1 ---
EditorFileDialog
只能查看user://
目录内容。ACCESS_FILESYSTEM = 2 ---
EditorFileDialog
可以查看整个本地文件系统。
枚举 DisplayMode :
DISPLAY_THUMBNAILS = 0 ---
EditorFileDialog
将资源显示为缩略图。DISPLAY_LIST = 1 ---
EditorFileDialog
将资源显示为文件名列表。
属性描述¶
Access access
违约 |
0 |
设定器 |
设置访问(值) |
吸气剂 |
获取访问权限() |
用户可以从中选择文件的位置,包括 res://
, user://
以及本地文件系统。
String current_dir
违约 |
“答复:/” |
设定器 |
设置当前目录(值) |
吸气剂 |
获取当前目录 |
当前占用的目录。
String current_file
违约 |
“ |
设定器 |
设置当前文件(值) |
吸气剂 |
获取当前文件() |
当前选定的文件。
String current_path
违约 |
“答复:/” |
设定器 |
设置当前路径(值) |
吸气剂 |
获取当前路径() |
地址栏中的文件系统路径。
bool disable_overwrite_warning
违约 |
假 |
设定器 |
设置禁用覆盖警告(值) |
吸气剂 |
_overwrite_warning_disabled()是否覆盖_警告? |
如果 true
, the EditorFileDialog
覆盖文件前不会警告用户。
DisplayMode display_mode
违约 |
0 |
设定器 |
设置显示模式(值) |
吸气剂 |
获取显示模式() |
视图格式,其中 EditorFileDialog
向用户显示资源。
Mode mode
违约 |
4 |
设定器 |
设置模式(值) |
吸气剂 |
获取_模式() |
目的 EditorFileDialog
定义允许的行为。
违约 |
假 |
设定器 |
设置显示隐藏文件(值) |
吸气剂 |
显示隐藏的文件()吗? |
如果 true
,隐藏的文件和目录将在 EditorFileDialog
.
方法说明¶
void add_filter ( String filter )
将逗号分隔的文件扩展名筛选器选项添加到 EditorFileDialog
带有可选的分号分隔标签。
例如, "*.tscn, *.scn; Scenes"
过滤文本“场景中的结果( * TSCN, * .scn)“。
void clear_filters ( )
删除除“所有文件”之外的所有筛选器( * )
VBoxContainer get_vbox ( )
返回 VBoxContainer
用于显示文件系统。
void invalidate ( )
通知 EditorFileDialog
它对数据的看法不再准确。在下次视图更新时更新视图内容。