ScriptCreateDialog¶
Inherits: ConfirmationDialog < AcceptDialog < WindowDialog < Popup < Control < CanvasItem < Node < Object
用于创建新 Script 文件的编辑器弹出对话框。
描述¶
ScriptCreateDialog
根据指定脚本语言的特定模板创建脚本文件。标准用法是在类似调用 Popup.popup 方法之前配置其字段。
func _ready():
dialog.config("Node", "res://new_node.gd") # For in-engine types
dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types
dialog.popup_centered()
属性¶
dialog_hide_on_ok |
|
|
margin_bottom |
|
|
margin_right |
|
|
rect_size |
|
|
window_title |
|
方法¶
void |
config ( String inherits, String path, bool built_in_enabled=true, bool load_enabled=true ) |
信号¶
script_created ( Script script )
当用户点击OK按钮时发出。
方法说明¶
预填必填字段以配置 ScriptCreateDialog 以供使用。