ScriptCreateDialog
Inherits: ConfirmationDialog < AcceptDialog < Window < Viewport < Entity < Object
Description
Section titled “Description”Orblit 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 one of the Window.popup() methods.
public override void OnStart(){ var dialog = new ScriptCreateDialog(); dialog.Config("Entity", "res://NewNode.cs"); // For in-engine types. dialog.Config("\"res://BaseNode.cs\"", "res://DerivedNode.cs"); // For script types. dialog.PopupCentered();}Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| bool | dialog_hide_on_ok |
false (overrides AcceptDialog) |
| String | ok_button_text |
"Create" (overrides AcceptDialog) |
| String | title |
"Attach Entity Script" (overrides Window) |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| void | config(inherits: String, path: String, built_in_enabled: bool = true, load_enabled: bool = true) |
Signals
Section titled “Signals”script_created
script_created(script: Script)
Emitted when the user clicks the OK button.
Method descriptions
Section titled “Method descriptions”config
void config(inherits: String, path: String, built_in_enabled: bool = true, load_enabled: bool = true)
Prefills required fields to configure the ScriptCreateDialog for use.
