class_linkbutton.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_LinkButton:
  4. LinkButton
  5. ==========
  6. **Inherits:** :ref:`BaseButton<class_basebutton>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Simple button used to represent a link to some resource
  11. Member Functions
  12. ----------------
  13. +------------------------------+-------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`String<class_string>` | :ref:`get_text<class_LinkButton_get_text>` **(** **)** const |
  15. +------------------------------+-------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`get_underline_mode<class_LinkButton_get_underline_mode>` **(** **)** const |
  17. +------------------------------+-------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_text<class_LinkButton_set_text>` **(** :ref:`String<class_string>` text **)** |
  19. +------------------------------+-------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_underline_mode<class_LinkButton_set_underline_mode>` **(** :ref:`int<class_int>` underline_mode **)** |
  21. +------------------------------+-------------------------------------------------------------------------------------------------------------------+
  22. Numeric Constants
  23. -----------------
  24. - **UNDERLINE_MODE_ALWAYS** = **0** --- The LinkButton will always show an underline at the bottom of its text
  25. - **UNDERLINE_MODE_ON_HOVER** = **1** --- The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.
  26. - **UNDERLINE_MODE_NEVER** = **2** --- The LinkButton will never show an underline at the bottom of its text.
  27. Description
  28. -----------
  29. This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page).
  30. Member Function Description
  31. ---------------------------
  32. .. _class_LinkButton_get_text:
  33. - :ref:`String<class_string>` **get_text** **(** **)** const
  34. Returns the text of the button.
  35. .. _class_LinkButton_get_underline_mode:
  36. - :ref:`int<class_int>` **get_underline_mode** **(** **)** const
  37. Returns the underline mode for this button.
  38. .. _class_LinkButton_set_text:
  39. - void **set_text** **(** :ref:`String<class_string>` text **)**
  40. Sets the text of the button.
  41. .. _class_LinkButton_set_underline_mode:
  42. - void **set_underline_mode** **(** :ref:`int<class_int>` underline_mode **)**
  43. Sets the underline mode for this button, the argument must be one of the :ref:`LinkButton<class_linkbutton>` constants (see constants section).