class_checkbutton.rst 5.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the CheckButton.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CheckButton:
  6. CheckButton
  7. ===========
  8. **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>`
  9. Checkable button. See also :ref:`CheckBox<class_CheckBox>`.
  10. Description
  11. -----------
  12. CheckButton is a toggle button displayed as a check field. It's similar to :ref:`CheckBox<class_CheckBox>` in functionality, but it has a different apperance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an **immediate** effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button.
  13. Properties
  14. ----------
  15. +-----------------------------------------+-------------+------------------------------+
  16. | :ref:`TextAlign<enum_Button_TextAlign>` | align | ``0`` *(parent override)* |
  17. +-----------------------------------------+-------------+------------------------------+
  18. | :ref:`bool<class_bool>` | toggle_mode | ``true`` *(parent override)* |
  19. +-----------------------------------------+-------------+------------------------------+
  20. Theme Properties
  21. ----------------
  22. +---------------------------------+--------------------------+------------------------------+
  23. | :ref:`int<class_int>` | check_vadjust | 0 |
  24. +---------------------------------+--------------------------+------------------------------+
  25. | :ref:`StyleBox<class_StyleBox>` | disabled | |
  26. +---------------------------------+--------------------------+------------------------------+
  27. | :ref:`StyleBox<class_StyleBox>` | focus | |
  28. +---------------------------------+--------------------------+------------------------------+
  29. | :ref:`Font<class_Font>` | font | |
  30. +---------------------------------+--------------------------+------------------------------+
  31. | :ref:`Color<class_Color>` | font_color | Color( 0.88, 0.88, 0.88, 1 ) |
  32. +---------------------------------+--------------------------+------------------------------+
  33. | :ref:`Color<class_Color>` | font_color_disabled | Color( 0.9, 0.9, 0.9, 0.2 ) |
  34. +---------------------------------+--------------------------+------------------------------+
  35. | :ref:`Color<class_Color>` | font_color_hover | Color( 0.94, 0.94, 0.94, 1 ) |
  36. +---------------------------------+--------------------------+------------------------------+
  37. | :ref:`Color<class_Color>` | font_color_hover_pressed | Color( 1, 1, 1, 1 ) |
  38. +---------------------------------+--------------------------+------------------------------+
  39. | :ref:`Color<class_Color>` | font_color_pressed | Color( 1, 1, 1, 1 ) |
  40. +---------------------------------+--------------------------+------------------------------+
  41. | :ref:`StyleBox<class_StyleBox>` | hover | |
  42. +---------------------------------+--------------------------+------------------------------+
  43. | :ref:`StyleBox<class_StyleBox>` | hover_pressed | |
  44. +---------------------------------+--------------------------+------------------------------+
  45. | :ref:`int<class_int>` | hseparation | 4 |
  46. +---------------------------------+--------------------------+------------------------------+
  47. | :ref:`StyleBox<class_StyleBox>` | normal | |
  48. +---------------------------------+--------------------------+------------------------------+
  49. | :ref:`Texture<class_Texture>` | off | |
  50. +---------------------------------+--------------------------+------------------------------+
  51. | :ref:`Texture<class_Texture>` | off_disabled | |
  52. +---------------------------------+--------------------------+------------------------------+
  53. | :ref:`Texture<class_Texture>` | on | |
  54. +---------------------------------+--------------------------+------------------------------+
  55. | :ref:`Texture<class_Texture>` | on_disabled | |
  56. +---------------------------------+--------------------------+------------------------------+
  57. | :ref:`StyleBox<class_StyleBox>` | pressed | |
  58. +---------------------------------+--------------------------+------------------------------+
  59. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  60. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  61. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`