Skip to content
Download
API reference

ScriptCreateDialog

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

Gobu 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.

fn _ready() void {
dialog : ScriptCreateDialog = ScriptCreateDialog.new()
dialog.config("Actor", "res://new_node.gro") # For in-engine types.
dialog.popup_centered()
}
TypeNameDefault
booldialog_hide_on_okfalse
Stringok_button_text"Create"
Stringtitle"Attach Actor Script"
ReturnsMethod
voidconfig(inherits, path, built_in_enabled, load_enabled)

script_created(script: Script)

Emitted when the user clicks the OK button.

bool dialog_hide_on_ok = false

Setter/getter: set_hide_on_ok(), get_hide_on_ok()

No description yet.

String ok_button_text = "Create"

Setter/getter: set_ok_button_text(), get_ok_button_text()

No description yet.

String title = "Attach Actor Script"

Setter/getter: set_title(), get_title()

No description yet.

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

Prefills required fields to configure the ScriptCreateDialog for use.