class_checkbox.rst 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. Properties
  14. ----------
  15. +-----------------------------------------+-------------+-----------------+
  16. | :ref:`TextAlign<enum_Button_TextAlign>` | align | **O:** ``0`` |
  17. +-----------------------------------------+-------------+-----------------+
  18. | :ref:`bool<class_bool>` | toggle_mode | **O:** ``true`` |
  19. +-----------------------------------------+-------------+-----------------+
  20. Theme Properties
  21. ----------------
  22. +-----------------------------------+--------------------------+------------------------------+
  23. | :ref:`int<class_int>` | check_vadjust | 0 |
  24. +-----------------------------------+--------------------------+------------------------------+
  25. | :ref:`Texture2D<class_Texture2D>` | checked | |
  26. +-----------------------------------+--------------------------+------------------------------+
  27. | :ref:`StyleBox<class_StyleBox>` | disabled | |
  28. +-----------------------------------+--------------------------+------------------------------+
  29. | :ref:`StyleBox<class_StyleBox>` | focus | |
  30. +-----------------------------------+--------------------------+------------------------------+
  31. | :ref:`Font<class_Font>` | font | |
  32. +-----------------------------------+--------------------------+------------------------------+
  33. | :ref:`Color<class_Color>` | font_color | Color( 0.88, 0.88, 0.88, 1 ) |
  34. +-----------------------------------+--------------------------+------------------------------+
  35. | :ref:`Color<class_Color>` | font_color_disabled | Color( 0.9, 0.9, 0.9, 0.2 ) |
  36. +-----------------------------------+--------------------------+------------------------------+
  37. | :ref:`Color<class_Color>` | font_color_hover | Color( 0.94, 0.94, 0.94, 1 ) |
  38. +-----------------------------------+--------------------------+------------------------------+
  39. | :ref:`Color<class_Color>` | font_color_hover_pressed | Color( 1, 1, 1, 1 ) |
  40. +-----------------------------------+--------------------------+------------------------------+
  41. | :ref:`Color<class_Color>` | font_color_pressed | Color( 1, 1, 1, 1 ) |
  42. +-----------------------------------+--------------------------+------------------------------+
  43. | :ref:`StyleBox<class_StyleBox>` | hover | |
  44. +-----------------------------------+--------------------------+------------------------------+
  45. | :ref:`StyleBox<class_StyleBox>` | hover_pressed | |
  46. +-----------------------------------+--------------------------+------------------------------+
  47. | :ref:`int<class_int>` | hseparation | 4 |
  48. +-----------------------------------+--------------------------+------------------------------+
  49. | :ref:`StyleBox<class_StyleBox>` | normal | |
  50. +-----------------------------------+--------------------------+------------------------------+
  51. | :ref:`StyleBox<class_StyleBox>` | pressed | |
  52. +-----------------------------------+--------------------------+------------------------------+
  53. | :ref:`Texture2D<class_Texture2D>` | radio_checked | |
  54. +-----------------------------------+--------------------------+------------------------------+
  55. | :ref:`Texture2D<class_Texture2D>` | radio_unchecked | |
  56. +-----------------------------------+--------------------------+------------------------------+
  57. | :ref:`Texture2D<class_Texture2D>` | unchecked | |
  58. +-----------------------------------+--------------------------+------------------------------+