2018-06-30 11:08:28 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2020-02-01 09:03:48 +08:00
<class name= "ScriptCreateDialog" inherits= "ConfirmationDialog" version= "4.0" >
2018-06-30 11:08:28 +08:00
<brief_description >
The Editor's popup dialog for creating new [Script] files.
</brief_description>
<description >
2020-03-31 17:56:58 +08:00
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 [method Window.popup] methods.
2020-11-28 07:33:15 +08:00
[codeblocks]
[gdscript]
2018-06-30 11:08:28 +08:00
func _ready():
2020-11-28 07:33:15 +08:00
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.
2018-12-14 16:37:19 +08:00
dialog.popup_centered()
2020-11-28 07:33:15 +08:00
[/gdscript]
[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();
}
[/csharp]
[/codeblocks]
2018-06-30 11:08:28 +08:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "config" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
<argument index= "0" name= "inherits" type= "String" />
<argument index= "1" name= "path" type= "String" />
<argument index= "2" name= "built_in_enabled" type= "bool" default= "true" />
<argument index= "3" name= "load_enabled" type= "bool" default= "true" />
2018-06-30 11:08:28 +08:00
<description >
Prefills required fields to configure the ScriptCreateDialog for use.
</description>
</method>
</methods>
2019-09-03 18:44:58 +08:00
<members >
2019-09-24 19:34:03 +08:00
<member name= "dialog_hide_on_ok" type= "bool" setter= "set_hide_on_ok" getter= "get_hide_on_ok" override= "true" default= "false" />
2020-03-31 17:56:58 +08:00
<member name= "title" type= "String" setter= "set_title" getter= "get_title" override= "true" default= ""Attach Node Script"" />
2019-09-03 18:44:58 +08:00
</members>
2018-06-30 11:08:28 +08:00
<signals >
<signal name= "script_created" >
2021-07-30 21:28:05 +08:00
<argument index= "0" name= "script" type= "Script" />
2018-06-30 11:08:28 +08:00
<description >
Emitted when the user clicks the OK button.
</description>
</signal>
</signals>
</class>