2
0

class_checkbox.rst 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 CheckBox.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CheckBox:
  6. CheckBox
  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. Binary choice user interface widget. See also :ref:`CheckButton<class_CheckButton>`.
  10. Description
  11. -----------
  12. A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to :ref:`CheckButton<class_CheckButton>` in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has **no** immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed.
  13. See also :ref:`BaseButton<class_BaseButton>` which contains common properties and methods associated with this node.
  14. Properties
  15. ----------
  16. +-----------------------------------------+-------------+------------------------------+
  17. | :ref:`TextAlign<enum_Button_TextAlign>` | align | ``0`` *(parent override)* |
  18. +-----------------------------------------+-------------+------------------------------+
  19. | :ref:`bool<class_bool>` | toggle_mode | ``true`` *(parent override)* |
  20. +-----------------------------------------+-------------+------------------------------+
  21. Theme Properties
  22. ----------------
  23. +---------------------------------+--------------------------+------------------------------+
  24. | :ref:`int<class_int>` | check_vadjust | 0 |
  25. +---------------------------------+--------------------------+------------------------------+
  26. | :ref:`Texture<class_Texture>` | checked | |
  27. +---------------------------------+--------------------------+------------------------------+
  28. | :ref:`StyleBox<class_StyleBox>` | disabled | |
  29. +---------------------------------+--------------------------+------------------------------+
  30. | :ref:`StyleBox<class_StyleBox>` | focus | |
  31. +---------------------------------+--------------------------+------------------------------+
  32. | :ref:`Font<class_Font>` | font | |
  33. +---------------------------------+--------------------------+------------------------------+
  34. | :ref:`Color<class_Color>` | font_color | Color( 0.88, 0.88, 0.88, 1 ) |
  35. +---------------------------------+--------------------------+------------------------------+
  36. | :ref:`Color<class_Color>` | font_color_disabled | Color( 0.9, 0.9, 0.9, 0.2 ) |
  37. +---------------------------------+--------------------------+------------------------------+
  38. | :ref:`Color<class_Color>` | font_color_hover | Color( 0.94, 0.94, 0.94, 1 ) |
  39. +---------------------------------+--------------------------+------------------------------+
  40. | :ref:`Color<class_Color>` | font_color_hover_pressed | Color( 1, 1, 1, 1 ) |
  41. +---------------------------------+--------------------------+------------------------------+
  42. | :ref:`Color<class_Color>` | font_color_pressed | Color( 1, 1, 1, 1 ) |
  43. +---------------------------------+--------------------------+------------------------------+
  44. | :ref:`StyleBox<class_StyleBox>` | hover | |
  45. +---------------------------------+--------------------------+------------------------------+
  46. | :ref:`StyleBox<class_StyleBox>` | hover_pressed | |
  47. +---------------------------------+--------------------------+------------------------------+
  48. | :ref:`int<class_int>` | hseparation | 4 |
  49. +---------------------------------+--------------------------+------------------------------+
  50. | :ref:`StyleBox<class_StyleBox>` | normal | |
  51. +---------------------------------+--------------------------+------------------------------+
  52. | :ref:`StyleBox<class_StyleBox>` | pressed | |
  53. +---------------------------------+--------------------------+------------------------------+
  54. | :ref:`Texture<class_Texture>` | radio_checked | |
  55. +---------------------------------+--------------------------+------------------------------+
  56. | :ref:`Texture<class_Texture>` | radio_unchecked | |
  57. +---------------------------------+--------------------------+------------------------------+
  58. | :ref:`Texture<class_Texture>` | unchecked | |
  59. +---------------------------------+--------------------------+------------------------------+
  60. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  61. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  62. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`