CheckBox.xml 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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" data_type="constant" type="int" default="0">
  22. The vertical offset used when rendering the check icons (in pixels).
  23. </theme_item>
  24. <theme_item name="checked" data_type="icon" type="Texture">
  25. The check icon to display when the [CheckBox] is checked.
  26. </theme_item>
  27. <theme_item name="checked_disabled" data_type="icon" type="Texture">
  28. The check icon to display when the [CheckBox] is checked and disabled.
  29. </theme_item>
  30. <theme_item name="disabled" data_type="style" type="StyleBox">
  31. The [StyleBox] to display as a background when the [CheckBox] is disabled.
  32. </theme_item>
  33. <theme_item name="focus" data_type="style" type="StyleBox">
  34. The [StyleBox] to display as a background when the [CheckBox] is focused.
  35. </theme_item>
  36. <theme_item name="font" data_type="font" type="Font">
  37. The [Font] to use for the [CheckBox] text.
  38. </theme_item>
  39. <theme_item name="font_color" data_type="color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
  40. The [CheckBox] text's font color.
  41. </theme_item>
  42. <theme_item name="font_color_disabled" data_type="color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
  43. The [CheckBox] text's font color when it's disabled.
  44. </theme_item>
  45. <theme_item name="font_color_focus" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  46. The [CheckBox] text's font color when it's focused. Only replaces the normal text color of the checkbox. Disabled, hovered, and pressed states take precedence over this color.
  47. </theme_item>
  48. <theme_item name="font_color_hover" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  49. The [CheckBox] text's font color when it's hovered.
  50. </theme_item>
  51. <theme_item name="font_color_hover_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
  52. The [CheckBox] text's font color when it's hovered and pressed.
  53. </theme_item>
  54. <theme_item name="font_color_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
  55. The [CheckBox] text's font color when it's pressed.
  56. </theme_item>
  57. <theme_item name="hover" data_type="style" type="StyleBox">
  58. The [StyleBox] to display as a background when the [CheckBox] is hovered.
  59. </theme_item>
  60. <theme_item name="hover_pressed" data_type="style" type="StyleBox">
  61. The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
  62. </theme_item>
  63. <theme_item name="hseparation" data_type="constant" type="int" default="4">
  64. The separation between the check icon and the text (in pixels).
  65. </theme_item>
  66. <theme_item name="normal" data_type="style" type="StyleBox">
  67. The [StyleBox] to display as a background.
  68. </theme_item>
  69. <theme_item name="pressed" data_type="style" type="StyleBox">
  70. The [StyleBox] to display as a background when the [CheckBox] is pressed.
  71. </theme_item>
  72. <theme_item name="radio_checked" data_type="icon" type="Texture">
  73. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
  74. </theme_item>
  75. <theme_item name="radio_checked_disabled" data_type="icon" type="Texture">
  76. </theme_item>
  77. <theme_item name="radio_unchecked" data_type="icon" type="Texture">
  78. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
  79. </theme_item>
  80. <theme_item name="radio_unchecked_disabled" data_type="icon" type="Texture">
  81. </theme_item>
  82. <theme_item name="unchecked" data_type="icon" type="Texture">
  83. The check icon to display when the [CheckBox] is unchecked.
  84. </theme_item>
  85. <theme_item name="unchecked_disabled" data_type="icon" type="Texture">
  86. The check icon to display when the [CheckBox] is unchecked and disabled.
  87. </theme_item>
  88. </theme_items>
  89. </class>