:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ScriptCreateDialog.xml. .. _class_ScriptCreateDialog: ScriptCreateDialog ================== **Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` Godot editor's popup dialog for creating new :ref:`Script` files. .. rst-class:: classref-introduction-group 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 :ref:`Window.popup` methods. .. tabs:: .. code-tab:: gdscript 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() .. code-tab:: csharp public override void _Ready() { var dialog = new ScriptCreateDialog(); dialog.Config("Node", "res://NewNode.cs"); // For in-engine types. dialog.Config("\"res://BaseNode.cs\"", "res://DerivedNode.cs"); // For script types. dialog.PopupCentered(); } .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------------+-------------------+------------------------------------------------------------------------------------------+ | :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | +-----------------------------+-------------------+------------------------------------------------------------------------------------------+ | :ref:`String` | ok_button_text | ``"Create"`` (overrides :ref:`AcceptDialog`) | +-----------------------------+-------------------+------------------------------------------------------------------------------------------+ | :ref:`String` | title | ``"Attach Node Script"`` (overrides :ref:`Window`) | +-----------------------------+-------------------+------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`config`\ (\ inherits\: :ref:`String`, path\: :ref:`String`, built_in_enabled\: :ref:`bool` = true, load_enabled\: :ref:`bool` = true\ ) | +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_ScriptCreateDialog_signal_script_created: .. rst-class:: classref-signal **script_created**\ (\ script\: :ref:`Script`\ ) :ref:`🔗` Emitted when the user clicks the OK button. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ScriptCreateDialog_method_config: .. rst-class:: classref-method |void| **config**\ (\ inherits\: :ref:`String`, path\: :ref:`String`, built_in_enabled\: :ref:`bool` = true, load_enabled\: :ref:`bool` = true\ ) :ref:`🔗` Prefills required fields to configure the ScriptCreateDialog for use. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`