mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
165 lines
5.5 KiB
ReStructuredText
165 lines
5.5 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. meta::
|
|
:keywords: tray
|
|
|
|
.. _class_StatusIndicator:
|
|
|
|
StatusIndicator
|
|
===============
|
|
|
|
**繼承:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
Application status indicator (aka notification area icon).
|
|
|
|
\ **Note:** Status indicator is implemented on macOS and Windows.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
屬性
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------+--------------------------------------------------------+------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`icon<class_StatusIndicator_property_icon>` | |
|
|
+-----------------------------------+--------------------------------------------------------+------------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`menu<class_StatusIndicator_property_menu>` | ``NodePath("")`` |
|
|
+-----------------------------------+--------------------------------------------------------+------------------+
|
|
| :ref:`String<class_String>` | :ref:`tooltip<class_StatusIndicator_property_tooltip>` | ``""`` |
|
|
+-----------------------------------+--------------------------------------------------------+------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`visible<class_StatusIndicator_property_visible>` | ``true`` |
|
|
+-----------------------------------+--------------------------------------------------------+------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
方法
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------+----------------------------------------------------------------------+
|
|
| :ref:`Rect2<class_Rect2>` | :ref:`get_rect<class_StatusIndicator_method_get_rect>`\ (\ ) |const| |
|
|
+---------------------------+----------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
訊號
|
|
----
|
|
|
|
.. _class_StatusIndicator_signal_pressed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**pressed**\ (\ mouse_button\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_StatusIndicator_signal_pressed>`
|
|
|
|
Emitted when the status indicator is pressed.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
屬性說明
|
|
--------
|
|
|
|
.. _class_StatusIndicator_property_icon:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **icon** :ref:`🔗<class_StatusIndicator_property_icon>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_icon**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ )
|
|
- :ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ )
|
|
|
|
Status indicator icon.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_StatusIndicator_property_menu:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`NodePath<class_NodePath>` **menu** = ``NodePath("")`` :ref:`🔗<class_StatusIndicator_property_menu>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_menu**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
|
|
- :ref:`NodePath<class_NodePath>` **get_menu**\ (\ )
|
|
|
|
Status indicator native popup menu. If this is set, the :ref:`pressed<class_StatusIndicator_signal_pressed>` signal is not emitted.
|
|
|
|
\ **Note:** Native popup is only supported if :ref:`NativeMenu<class_NativeMenu>` supports :ref:`NativeMenu.FEATURE_POPUP_MENU<class_NativeMenu_constant_FEATURE_POPUP_MENU>` feature.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_StatusIndicator_property_tooltip:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **tooltip** = ``""`` :ref:`🔗<class_StatusIndicator_property_tooltip>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_tooltip**\ (\ value\: :ref:`String<class_String>`\ )
|
|
- :ref:`String<class_String>` **get_tooltip**\ (\ )
|
|
|
|
Status indicator tooltip.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_StatusIndicator_property_visible:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **visible** = ``true`` :ref:`🔗<class_StatusIndicator_property_visible>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_visible**\ (\ )
|
|
|
|
If ``true``, the status indicator is visible.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
方法說明
|
|
--------
|
|
|
|
.. _class_StatusIndicator_method_get_rect:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Rect2<class_Rect2>` **get_rect**\ (\ ) |const| :ref:`🔗<class_StatusIndicator_method_get_rect>`
|
|
|
|
Returns the status indicator rectangle in screen coordinates. If this status indicator is not visible, returns an empty :ref:`Rect2<class_Rect2>`.
|
|
|
|
.. |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 (無回傳值。)`
|