From 2a6c591957b456961db192908ce62d997d34acac Mon Sep 17 00:00:00 2001 From: willnationsdev Date: Fri, 29 Jun 2018 22:08:28 -0500 Subject: Expose ScriptCreateDialog to EditorPlugin --- doc/classes/EditorPlugin.xml | 7 ++++++ doc/classes/ScriptCreateDialog.xml | 45 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 doc/classes/ScriptCreateDialog.xml (limited to 'doc/classes') diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index b9945f3f73..f5fbf8e313 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -235,6 +235,13 @@ + + + + + Gets the Editor's dialogue used for making scripts. Note that users can configure it before use. + + diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml new file mode 100644 index 0000000000..f09d282026 --- /dev/null +++ b/doc/classes/ScriptCreateDialog.xml @@ -0,0 +1,45 @@ + + + + The Editor's popup dialog for creating new [Script] files. + + + 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 [method popup]() method. + [codeblock] + 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() + [/codeblock] + + + + + + + + + + + The dialog's "Inherits" field content. + + + The dialog's "Path" field content. + + + Prefills required fields to configure the ScriptCreateDialog for use. + + + + + + + + + Emitted when the user clicks the OK button. + + + + + + -- cgit v1.2.3