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.

ScriptCreateDialog

Inherits: ConfirmationDialog < AcceptDialog < Window < Viewport < Node < Object

Godot editor's popup dialog for creating new Script files.

描述

The ScriptCreateDialog creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the Window.popup methods.

func _ready():
    var dialog = ScriptCreateDialog.new();
    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()

属性

bool

dialog_hide_on_ok

false (overrides AcceptDialog)

String

ok_button_text

"Create" (overrides AcceptDialog)

String

title

"Attach Node Script" (overrides Window)

Methods

void

config ( String inherits, String path, bool built_in_enabled=true, bool load_enabled=true )


信号

script_created ( Script script )

Emitted when the user clicks the OK button.


Method Descriptions

void config ( String inherits, String path, bool built_in_enabled=true, bool load_enabled=true )

Prefills required fields to configure the ScriptCreateDialog for use.