mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
162 lines
9.5 KiB
ReStructuredText
162 lines
9.5 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. meta::
|
||
:keywords: tilemap
|
||
|
||
.. _class_GridMapEditorPlugin:
|
||
|
||
GridMapEditorPlugin
|
||
===================
|
||
|
||
**Наследует:** :ref:`EditorPlugin<class_EditorPlugin>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
Редактор узлов :ref:`GridMap<class_GridMap>`.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Описание
|
||
----------------
|
||
|
||
GridMapEditorPlugin обеспечивает доступ к функциональным возможностям редактора :ref:`GridMap<class_GridMap>`.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методы
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_selection<class_GridMapEditorPlugin_method_clear_selection>`\ (\ ) |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`GridMap<class_GridMap>` | :ref:`get_current_grid_map<class_GridMapEditorPlugin_method_get_current_grid_map>`\ (\ ) |const| |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>` | :ref:`get_selected_cells<class_GridMapEditorPlugin_method_get_selected_cells>`\ (\ ) |const| |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_selected_palette_item<class_GridMapEditorPlugin_method_get_selected_palette_item>`\ (\ ) |const| |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`AABB<class_AABB>` | :ref:`get_selection<class_GridMapEditorPlugin_method_get_selection>`\ (\ ) |const| |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`has_selection<class_GridMapEditorPlugin_method_has_selection>`\ (\ ) |const| |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_selected_palette_item<class_GridMapEditorPlugin_method_set_selected_palette_item>`\ (\ item\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_selection<class_GridMapEditorPlugin_method_set_selection>`\ (\ begin\: :ref:`Vector3i<class_Vector3i>`, end\: :ref:`Vector3i<class_Vector3i>`\ ) |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания метода
|
||
------------------------------
|
||
|
||
.. _class_GridMapEditorPlugin_method_clear_selection:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_selection**\ (\ ) :ref:`🔗<class_GridMapEditorPlugin_method_clear_selection>`
|
||
|
||
Отменяет выбор всех выбранных в данный момент ячеек.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GridMapEditorPlugin_method_get_current_grid_map:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`GridMap<class_GridMap>` **get_current_grid_map**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_current_grid_map>`
|
||
|
||
Возвращает узел :ref:`GridMap<class_GridMap>`, который в данный момент редактируется редактором карты сетки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GridMapEditorPlugin_method_get_selected_cells:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>` **get_selected_cells**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selected_cells>`
|
||
|
||
Возвращает массив :ref:`Vector3i<class_Vector3i>` с координатами выбранных ячеек.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GridMapEditorPlugin_method_get_selected_palette_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_selected_palette_item**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selected_palette_item>`
|
||
|
||
Возвращает индекс выбранного элемента :ref:`MeshLibrary<class_MeshLibrary>` в палитре редактора карты сетки или ``-1``, если элемент не выбран.
|
||
|
||
\ **Примечание:** Индексы могут быть не в том же порядке, в котором они отображаются в интерфейсе редактора.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GridMapEditorPlugin_method_get_selection:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`AABB<class_AABB>` **get_selection**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selection>`
|
||
|
||
Возвращает границы координат ячейки текущего выделения. Используйте :ref:`has_selection()<class_GridMapEditorPlugin_method_has_selection>`, чтобы проверить, есть ли активное выделение.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GridMapEditorPlugin_method_has_selection:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **has_selection**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_has_selection>`
|
||
|
||
Возвращает ``true``, если есть выбранные ячейки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GridMapEditorPlugin_method_set_selected_palette_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_selected_palette_item**\ (\ item\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_set_selected_palette_item>`
|
||
|
||
Выбирает элемент :ref:`MeshLibrary<class_MeshLibrary>` с указанным индексом в палитре редактора карты сетки. Если указан отрицательный индекс, элемент не будет выбран. Если указано значение, большее последнего индекса, будет выбран последний элемент.
|
||
|
||
\ **Примечание:** Индексы могут быть не в том же порядке, в котором они отображаются в интерфейсе редактора.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GridMapEditorPlugin_method_set_selection:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_selection**\ (\ begin\: :ref:`Vector3i<class_Vector3i>`, end\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_GridMapEditorPlugin_method_set_selection>`
|
||
|
||
Выбирает ячейки внутри указанных границ от ``begin`` до ``end``.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Этот метод обычно должен быть переопределен пользователем, чтобы иметь какой-либо эффект.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Этот метод не имеет побочных эффектов. Он не изменяет ни одну из переменных-членов экземпляра.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Этот метод принимает любое количество аргументов после описанных здесь.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Этот метод используется для создания типа.)`
|
||
.. |static| replace:: :abbr:`static (Этот метод не нуждается в вызове экземпляра, поэтому его можно вызвать напрямую, используя имя класса.)`
|
||
.. |operator| replace:: :abbr:`operator (Этот метод описывает допустимый оператор для использования с этим типом в качестве левого операнда.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Это значение является целым числом, составленным как битовая маска следующих флагов.)`
|
||
.. |void| replace:: :abbr:`void (Нет возвращаемого значения.)`
|