ScriptCreateDialog

Inherits:ConfirmationDialog<AcceptDialog<Window<Viewport<Node<Object

Godot editor's popup dialog for creating newScript files.

Description

TheScriptCreateDialog 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 theWindow.popup() methods.

func_ready():vardialog=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()

Properties

bool

dialog_hide_on_ok

false (overridesAcceptDialog)

String

ok_button_text

"Create" (overridesAcceptDialog)

String

title

"AttachNodeScript" (overridesWindow)

Methods

void

config(inherits:String, path:String, built_in_enabled:bool = true, load_enabled:bool = true)


Signals

script_created(script:Script)🔗

Emitted when the user clicks the OK button.


Method Descriptions

voidconfig(inherits:String, path:String, built_in_enabled:bool = true, load_enabled:bool = true)🔗

Prefills required fields to configure the ScriptCreateDialog for use.


User-contributed notes

Please read theUser-contributed notes policy before submitting a comment.