Skip to content

ScriptCreateDialog

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

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();
}
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)
Returns Method
void config(inherits: String, path: String, built_in_enabled: bool = true, load_enabled: bool = true)

script_created

script_created(script: Script)

Emitted when the user clicks the OK button.

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.