class_toolbutton.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ToolButton.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ToolButton:
  5. ToolButton
  6. ==========
  7. **Inherits:** :ref:`Button<class_Button>` **<** :ref:`BaseButton<class_BaseButton>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Flat button helper class.
  12. Theme Properties
  13. ----------------
  14. +---------------------------------+---------------------+
  15. | :ref:`StyleBox<class_StyleBox>` | disabled |
  16. +---------------------------------+---------------------+
  17. | :ref:`StyleBox<class_StyleBox>` | focus |
  18. +---------------------------------+---------------------+
  19. | :ref:`Font<class_Font>` | font |
  20. +---------------------------------+---------------------+
  21. | :ref:`Color<class_Color>` | font_color |
  22. +---------------------------------+---------------------+
  23. | :ref:`Color<class_Color>` | font_color_disabled |
  24. +---------------------------------+---------------------+
  25. | :ref:`Color<class_Color>` | font_color_hover |
  26. +---------------------------------+---------------------+
  27. | :ref:`Color<class_Color>` | font_color_pressed |
  28. +---------------------------------+---------------------+
  29. | :ref:`StyleBox<class_StyleBox>` | hover |
  30. +---------------------------------+---------------------+
  31. | :ref:`int<class_int>` | hseparation |
  32. +---------------------------------+---------------------+
  33. | :ref:`StyleBox<class_StyleBox>` | normal |
  34. +---------------------------------+---------------------+
  35. | :ref:`StyleBox<class_StyleBox>` | pressed |
  36. +---------------------------------+---------------------+
  37. Description
  38. -----------
  39. This is a helper class to generate a flat :ref:`Button<class_Button>` (see :ref:`Button.flat<class_Button_property_flat>`), creating a ``ToolButton`` is equivalent to:
  40. ::
  41. var btn = Button.new()
  42. btn.flat = true