ScriptCreateDialog

Inherits: ConfirmationDialog < AcceptDialog < WindowDialog < Popup < Control < CanvasItem < Node < Object

Category: Core

Brief Description

The Editor’s popup dialog for creating new Script files.

Methods

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

Signals

  • script_created ( Script script )

Emitted when the user clicks the OK button.

Description

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 a :ref:`popup<class_ScriptCreateDialog_popup>`() method.

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()

Method Descriptions

Prefills required fields to configure the ScriptCreateDialog for use.