summaryrefslogtreecommitdiff
path: root/doc/classes/ScriptCreateDialog.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/ScriptCreateDialog.xml')
-rw-r--r--doc/classes/ScriptCreateDialog.xml38
1 files changed, 22 insertions, 16 deletions
diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml
index aa60ecb12b..189bfdc3b8 100644
--- a/doc/classes/ScriptCreateDialog.xml
+++ b/doc/classes/ScriptCreateDialog.xml
@@ -5,27 +5,34 @@
</brief_description>
<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 [method Window.popup] methods.
- [codeblock]
+ [codeblocks]
+ [gdscript]
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
+ 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()
- [/codeblock]
+ [/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]
</description>
<tutorials>
</tutorials>
<methods>
<method name="config">
- <return type="void">
- </return>
- <argument index="0" name="inherits" type="String">
- </argument>
- <argument index="1" name="path" type="String">
- </argument>
- <argument index="2" name="built_in_enabled" type="bool" default="true">
- </argument>
- <argument index="3" name="load_enabled" type="bool" default="true">
- </argument>
+ <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" />
<description>
Prefills required fields to configure the ScriptCreateDialog for use.
</description>
@@ -37,8 +44,7 @@
</members>
<signals>
<signal name="script_created">
- <argument index="0" name="script" type="Script">
- </argument>
+ <argument index="0" name="script" type="Script" />
<description>
Emitted when the user clicks the OK button.
</description>