CheckBox.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CheckBox" inherits="Button" version="3.4">
  3. <brief_description>
  4. Binary choice user interface widget. See also [CheckButton].
  5. </brief_description>
  6. <description>
  7. A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed.
  8. See also [BaseButton] which contains common properties and methods associated with this node.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. </methods>
  14. <members>
  15. <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
  16. <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
  17. </members>
  18. <constants>
  19. </constants>
  20. <theme_items>
  21. <theme_item name="check_vadjust" type="int" default="0">
  22. The vertical offset used when rendering the check icons (in pixels).
  23. </theme_item>
  24. <theme_item name="checked" type="Texture">
  25. The check icon to display when the [CheckBox] is checked.
  26. </theme_item>
  27. <theme_item name="checked_disabled" type="Texture">
  28. </theme_item>
  29. <theme_item name="disabled" type="StyleBox">
  30. The [StyleBox] to display as a background when the [CheckBox] is disabled.
  31. </theme_item>
  32. <theme_item name="focus" type="StyleBox">
  33. The [StyleBox] to display as a background when the [CheckBox] is focused.
  34. </theme_item>
  35. <theme_item name="font" type="Font">
  36. The [Font] to use for the [CheckBox] text.
  37. </theme_item>
  38. <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
  39. The [CheckBox] text's font color.
  40. </theme_item>
  41. <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
  42. The [CheckBox] text's font color when it's disabled.
  43. </theme_item>
  44. <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  45. The [CheckBox] text's font color when it's hovered.
  46. </theme_item>
  47. <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
  48. The [CheckBox] text's font color when it's hovered and pressed.
  49. </theme_item>
  50. <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
  51. The [CheckBox] text's font color when it's pressed.
  52. </theme_item>
  53. <theme_item name="hover" type="StyleBox">
  54. The [StyleBox] to display as a background when the [CheckBox] is hovered.
  55. </theme_item>
  56. <theme_item name="hover_pressed" type="StyleBox">
  57. The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
  58. </theme_item>
  59. <theme_item name="hseparation" type="int" default="4">
  60. The separation between the check icon and the text (in pixels).
  61. </theme_item>
  62. <theme_item name="normal" type="StyleBox">
  63. The [StyleBox] to display as a background.
  64. </theme_item>
  65. <theme_item name="pressed" type="StyleBox">
  66. The [StyleBox] to display as a background when the [CheckBox] is pressed.
  67. </theme_item>
  68. <theme_item name="radio_checked" type="Texture">
  69. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
  70. </theme_item>
  71. <theme_item name="radio_checked_disabled" type="Texture">
  72. </theme_item>
  73. <theme_item name="radio_unchecked" type="Texture">
  74. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
  75. </theme_item>
  76. <theme_item name="radio_unchecked_disabled" type="Texture">
  77. </theme_item>
  78. <theme_item name="unchecked" type="Texture">
  79. The check icon to display when the [CheckBox] is unchecked.
  80. </theme_item>
  81. <theme_item name="unchecked_disabled" type="Texture">
  82. </theme_item>
  83. </theme_items>
  84. </class>