class
Lapis::Editor::ActionDriver
- Lapis::Editor::ActionDriver
- Reference
- Object
Defined in:
libgodot/editor/action_driver.crlibgodot/editor/action_driver_vision.cr
Constructors
Instance Method Summary
- #action_log : Array(String)
- #base_control : Godot::Control | Nil
-
#capture_ai_manifest(output_dir : String = "reports/ai_vision") : NamedTuple(manifest_path: String, screenshot_path: String, count: Int32)
Discovers all visible interactive controls, saves crops, full screenshot, and a JSON manifest
-
#click(control : Godot::Control) : Void
Simulates a mouse click (mouse button down + mouse button up) at center of target control
-
#click_crystal_build_button : Bool
Clicks the "Build Crystal" toolbar button
-
#crop_element(control : Godot::Control, output_path : String = "reports/elements/element.png") : String | Nil
Crops a single Control into an isolated PNG screenshot based on its global rectangle
-
#double_click(control : Godot::Control) : Void
Simulates a double-click
-
#dump_dom(root : Godot::Node | Nil = nil, max_depth : Int32 = 6) : String
Dumps the editor UI hierarchy as an indented text tree
-
#find_button(text_or_name : String, root : Godot::Node | Nil = nil) : Godot::Button | Nil
Finds a Button by text, tooltip, or node name
-
#find_control(selector : String, root : Godot::Node | Nil = nil) : Godot::Control | Nil
Finds a generic Control by CSS/XPath-like selector (e.g.
-
#find_control_where(root : Godot::Node | Nil = nil, max_depth : Int32 = 12, &predicate : Godot::Control -> Bool) : Godot::Control | Nil
Finds any Control matching predicate recursively
-
#find_crystal_build_button : Godot::Button | Nil
Locates the "Build Crystal" toolbar button
-
#find_crystal_console_dock : Godot::Control | Nil
Locates the "CrystalConsoleDock" bottom panel companion control
-
#find_crystal_panel : Godot::Control | Nil
Locates the "CrystalPanel" main screen hub control
-
#find_dock(dock_name : String) : Godot::Control | Nil
Finds an Editor Dock by title/name (e.g.
-
#find_inspector_property(prop_name : String) : Godot::Control | Nil
Finds an Inspector EditorProperty control for property name
-
#find_line_edit(name_or_placeholder : String, root : Godot::Node | Nil = nil) : Godot::LineEdit | Nil
Finds a LineEdit by placeholder text or node name
-
#find_tree(name_or_class : String = "Tree", root : Godot::Node | Nil = nil) : Godot::Tree | Nil
Finds a Tree control by name or class
-
#get_active_code_edit : Godot::Control | Nil
Returns the active CodeEdit control inside ScriptEditor if available
-
#get_current_script_path : String | Nil
Returns the resource path of the currently active script in ScriptEditor, or nil
-
#get_open_script_paths : Array(String)
Returns resource paths of all currently open scripts in ScriptEditor
-
#has_crystal_build_button? : Bool
Checks whether the "Build Crystal" button exists in the editor UI
-
#has_crystal_console_dock? : Bool
Checks whether the "CrystalConsoleDock" bottom panel dock exists in the editor UI
-
#has_crystal_panel? : Bool
Checks whether the "CrystalPanel" main screen tab exists in the editor UI
- #log_action(msg : String) : Void
-
#open_crystal_main_screen : Bool
Switches the active main screen tab to Crystal
-
#open_scene(res_path : String) : Void
Opens a scene in the editor from path
-
#open_script(path : String, line : Int32 = 1, col : Int32 = 0) : Bool
Opens a script in the editor's ScriptEditor and jumps to the line/column
-
#resolve_editor_base_control : Godot::Control | Nil
Resolves the root Control of the Godot Editor
-
#right_click(control : Godot::Control) : Void
Simulates a right-click (secondary mouse button for context menus)
-
#save_scene : Void
Triggers Save Scene (Ctrl+S equivalent)
-
#select_node_in_scene(node_name_or_path : String) : Void
Selects an edited scene node by name or path
-
#select_tab(container_or_bar : Godot::Control, tab_name_or_index : String | Int32) : Void
Switches an Editor TabBar or TabContainer to the named tab or index
-
#switch_to_main_screen(screen_name : String) : Void
Switches the Godot Editor Main Screen tab (e.g.
-
#take_screenshot(output_path : String = "reports/screenshots/editor.png") : String | Nil
Captures full editor viewport screenshot and saves to file
-
#trigger_crystal_build : Void
Triggers the "Build Crystal" compile button
-
#type_text(control : Godot::Control, text : String) : Void
Simulates entering text into a LineEdit / TextEdit
-
#wait_for_visible(control : Godot::Control, timeout_sec : Float64 = 3.0) : Void
Waits until control is visible
-
#wait_until(timeout_sec : Float64 = 5.0, msg : String = "", &condition : -> Bool) : Bool
Waits until the condition evaluates to true within timeout_sec
Instance methods inherited from class Object
try?(&)try? try?
Constructor Detail
Instance Method Detail
Discovers all visible interactive controls, saves crops, full screenshot, and a JSON manifest
Simulates a mouse click (mouse button down + mouse button up) at center of target control
Crops a single Control into an isolated PNG screenshot based on its global rectangle
Dumps the editor UI hierarchy as an indented text tree
Finds a Button by text, tooltip, or node name
Finds a generic Control by CSS/XPath-like selector (e.g. "Button[text='Build']", "LineEdit#Filter", "CrystalPanel")
Finds any Control matching predicate recursively
Locates the "CrystalConsoleDock" bottom panel companion control
Finds an Editor Dock by title/name (e.g. "Scene", "FileSystem", "Inspector", "CrystalPanel")
Finds an Inspector EditorProperty control for property name
Finds a LineEdit by placeholder text or node name
Finds a Tree control by name or class
Returns the active CodeEdit control inside ScriptEditor if available
Returns the resource path of the currently active script in ScriptEditor, or nil
Returns resource paths of all currently open scripts in ScriptEditor
Checks whether the "Build Crystal" button exists in the editor UI
Checks whether the "CrystalConsoleDock" bottom panel dock exists in the editor UI
Checks whether the "CrystalPanel" main screen tab exists in the editor UI
Opens a script in the editor's ScriptEditor and jumps to the line/column
Resolves the root Control of the Godot Editor
Simulates a right-click (secondary mouse button for context menus)
Selects an edited scene node by name or path
Switches an Editor TabBar or TabContainer to the named tab or index
Switches the Godot Editor Main Screen tab (e.g. "2D", "3D", "Script", "Crystal")
Captures full editor viewport screenshot and saves to file
Simulates entering text into a LineEdit / TextEdit
Waits until control is visible