Godot::EditorScriptCreation
Constants
Class methods
Adapts the file path inside a native ScriptCreateDialog to ensure a clean .cr extension when Crystal is selected
Normalizes a path to end with exactly one .cr extension, stripping duplicate dots or other extensions
Recursively discovers all child nodes matching the specified Godot class name
Repairs a Godot native ScriptCreateDialog's language menu:
- Updates index 1 (CrystalLanguage) text to "Crystal" and sets official Crystal icon
- Prunes any out-of-bounds surplus items (count must never exceed ScriptServer language count)
- Ensures valid selection index so it never shows broken red icon or empty fields
- Sets up live path adaptation when language is switched
Retrieves the selected type from a Godot CreateDialog by inspecting its Tree control
Sets up all editor integration entry points: toolbar button, FileSystem dock menus, SceneTree menus, and ScriptCreateDialog interception
Intercepts Godot's built-in ScriptCreateDialog whenever CrystalScript is selected in "Create New Resource" (FileSystem Dock -> Create New -> Resource -> CrystalScript) and repairs native ScriptCreateDialog instances so they never show broken red icons.
- Top Toolbar "+ Script" Button
- Interactive Dialog Presentation
Converts CamelCase to snake_case for clean Crystal file naming