ScriptCreateDialog

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

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

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 one of the Popup.popup methods.

  1. func _ready():
  2. dialog.config("Node", "res://new_node.gd") # For in-engine types
  3. dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types
  4. dialog.popup_centered()

Properties

booldialog_hide_on_okfalse (parent override)
floatmargin_bottom232.0 (parent override)
floatmargin_right361.0 (parent override)
Vector2rect_sizeVector2( 361, 232 ) (parent override)
Stringwindow_title“Attach Node Script” (parent override)

Methods

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

Signals

  • script_created ( Script script )

Emitted when the user clicks the OK button.

Method Descriptions

Prefills required fields to configure the ScriptCreateDialog for use.