Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
ScriptCreateDialog
繼承: ConfirmationDialog < AcceptDialog < Window < Viewport < Node < Object
Godot 編輯器用於建立新 Script 檔的彈出對話方塊。
說明
ScriptCreateDialog 會根據給定的範本為給定的指令碼語言建立指令檔。標準用法是在呼叫任何 Window.popup() 方法之前,先配置其欄位。
func _ready():
var dialog = ScriptCreateDialog.new();
dialog.config("Node", "res://new_node.gd") # 對於引擎內建型別。
dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # 對於腳本型別。
dialog.popup_centered()
public override void _Ready()
{
var dialog = new ScriptCreateDialog();
dialog.Config("Node", "res://NewNode.cs"); // 對於引擎內建型別。
dialog.Config("\"res://BaseNode.cs\"", "res://DerivedNode.cs"); // 對於腳本型別。
dialog.PopupCentered();
}
屬性
dialog_hide_on_ok |
|
|
ok_button_text |
|
|
title |
|
方法
void |
config(inherits: String, path: String, built_in_enabled: bool = true, load_enabled: bool = true) |
訊號
script_created(script: Script) 🔗
當使用者點擊確定按鈕時發出。
方法說明
void config(inherits: String, path: String, built_in_enabled: bool = true, load_enabled: bool = true) 🔗
預填必填欄位以配置 ScriptCreateDialog 以供使用。