123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/ScriptEditor.xml.
- .. _class_ScriptEditor:
- ScriptEditor
- ============
- **Inherits:** :ref:`PanelContainer<class_PanelContainer>` **<** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- Godot editor's script editor.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_script_editor<class_EditorInterface_method_get_script_editor>`.
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`can_drop_data_fw<class_ScriptEditor_method_can_drop_data_fw>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Variant<class_Variant>` data, :ref:`Control<class_Control>` from **)** |const| |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`drop_data_fw<class_ScriptEditor_method_drop_data_fw>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Variant<class_Variant>` data, :ref:`Control<class_Control>` from **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Control<class_Control>` | :ref:`get_base_editor<class_ScriptEditor_method_get_base_editor>` **(** **)** |const| |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Script<class_Script>` | :ref:`get_current_script<class_ScriptEditor_method_get_current_script>` **(** **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_Variant>` | :ref:`get_drag_data_fw<class_ScriptEditor_method_get_drag_data_fw>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Control<class_Control>` from **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>` | :ref:`get_open_scripts<class_ScriptEditor_method_get_open_scripts>` **(** **)** |const| |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`goto_line<class_ScriptEditor_method_goto_line>` **(** :ref:`int<class_int>` line_number **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`open_script_create_dialog<class_ScriptEditor_method_open_script_create_dialog>` **(** :ref:`String<class_String>` base_name, :ref:`String<class_String>` base_path **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`reload_scripts<class_ScriptEditor_method_reload_scripts>` **(** **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Signals
- -------
- .. _class_ScriptEditor_signal_editor_script_changed:
- .. rst-class:: classref-signal
- **editor_script_changed** **(** :ref:`Script<class_Script>` script **)**
- Emitted when user changed active script. Argument is a freshly activated :ref:`Script<class_Script>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_signal_script_close:
- .. rst-class:: classref-signal
- **script_close** **(** :ref:`Script<class_Script>` script **)**
- Emitted when editor is about to close the active script. Argument is a :ref:`Script<class_Script>` that is going to be closed.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_ScriptEditor_method_can_drop_data_fw:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **can_drop_data_fw** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Variant<class_Variant>` data, :ref:`Control<class_Control>` from **)** |const|
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_method_drop_data_fw:
- .. rst-class:: classref-method
- void **drop_data_fw** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Variant<class_Variant>` data, :ref:`Control<class_Control>` from **)**
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_method_get_base_editor:
- .. rst-class:: classref-method
- :ref:`Control<class_Control>` **get_base_editor** **(** **)** |const|
- Returns the underlying :ref:`Control<class_Control>` used for editing scripts. For text scripts, this is a :ref:`TextEdit<class_TextEdit>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_method_get_current_script:
- .. rst-class:: classref-method
- :ref:`Script<class_Script>` **get_current_script** **(** **)**
- Returns a :ref:`Script<class_Script>` that is currently active in editor.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_method_get_drag_data_fw:
- .. rst-class:: classref-method
- :ref:`Variant<class_Variant>` **get_drag_data_fw** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Control<class_Control>` from **)**
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_method_get_open_scripts:
- .. rst-class:: classref-method
- :ref:`Array<class_Array>` **get_open_scripts** **(** **)** |const|
- Returns an array with all :ref:`Script<class_Script>` objects which are currently open in editor.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_method_goto_line:
- .. rst-class:: classref-method
- void **goto_line** **(** :ref:`int<class_int>` line_number **)**
- Goes to the specified line in the current script.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_method_open_script_create_dialog:
- .. rst-class:: classref-method
- void **open_script_create_dialog** **(** :ref:`String<class_String>` base_name, :ref:`String<class_String>` base_path **)**
- Opens the script create dialog. The script will extend ``base_name``. The file extension can be omitted from ``base_path``. It will be added based on the selected scripting language.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ScriptEditor_method_reload_scripts:
- .. rst-class:: classref-method
- void **reload_scripts** **(** **)**
- Reload all currently opened scripts from disk in case the file contents are newer.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|