diff options
author | willnationsdev <willnationsdev@gmail.com> | 2018-06-29 22:08:28 -0500 |
---|---|---|
committer | Will Nations <willnationsdev@gmail.com> | 2018-07-04 09:41:12 -0500 |
commit | 2a6c591957b456961db192908ce62d997d34acac (patch) | |
tree | da84c697d3643b0768113b5fa67ee8a21a073db9 /doc/classes | |
parent | 0ffec7daf762b74c7453aa22b71865e63660901c (diff) |
Expose ScriptCreateDialog to EditorPlugin
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/EditorPlugin.xml | 7 | ||||
-rw-r--r-- | doc/classes/ScriptCreateDialog.xml | 45 |
2 files changed, 52 insertions, 0 deletions
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 @@ <description> </description> </method> + <method name="get_script_create_dialog"> + <return type="ScriptCreateDialog"> + </return> + <description> + Gets the Editor's dialogue used for making scripts. Note that users can configure it before use. + </description> + </method> <method name="get_state" qualifiers="virtual"> <return type="Dictionary"> </return> 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 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ScriptCreateDialog" inherits="ConfirmationDialog" category="Core" version="3.1"> + <brief_description> + The Editor's popup dialog for creating new [Script] files. + </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 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] + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="config"> + <return type="void"> + </return> + <argument index="0" name="inherits" type="String"> + The dialog's "Inherits" field content. + </argument> + <argument index="1" name="path" type="String"> + The dialog's "Path" field content. + </argument> + <description> + Prefills required fields to configure the ScriptCreateDialog for use. + </description> + </method> + </methods> + <signals> + <signal name="script_created"> + <argument index="0" name="script" type="Object"> + </argument> + <description> + Emitted when the user clicks the OK button. + </description> + </signal> + </signals> + <constants> + </constants> +</class> |