Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0
. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
ScriptCreateDialog¶
Inherits: ConfirmationDialog < AcceptDialog < Window < Viewport < Node < Object
The Editor's popup dialog for creating new Script files.
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 Window.popup methods.
func _ready():
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()
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();
}
Properties¶
dialog_hide_on_ok |
|
|
ok_button_text |
|
|
title |
|
Methods¶
void |
config ( String inherits, String path, bool built_in_enabled=true, bool load_enabled=true ) |
Signals¶
script_created ( Script script )
Emitted when the user clicks the OK button.
Method Descriptions¶
void config ( String inherits, String path, bool built_in_enabled=true, bool load_enabled=true )
Prefills required fields to configure the ScriptCreateDialog for use.