CheckBox.xml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CheckBox" inherits="Button" version="3.3">
  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="disabled" type="StyleBox">
  28. The [StyleBox] to display as a background when the [CheckBox] is disabled.
  29. </theme_item>
  30. <theme_item name="focus" type="StyleBox">
  31. The [StyleBox] to display as a background when the [CheckBox] is focused.
  32. </theme_item>
  33. <theme_item name="font" type="Font">
  34. The [Font] to use for the [CheckBox] text.
  35. </theme_item>
  36. <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
  37. The [CheckBox] text's font color.
  38. </theme_item>
  39. <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
  40. The [CheckBox] text's font color when it's disabled.
  41. </theme_item>
  42. <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  43. The [CheckBox] text's font color when it's hovered.
  44. </theme_item>
  45. <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
  46. The [CheckBox] text's font color when it's hovered and pressed.
  47. </theme_item>
  48. <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
  49. The [CheckBox] text's font color when it's pressed.
  50. </theme_item>
  51. <theme_item name="hover" type="StyleBox">
  52. The [StyleBox] to display as a background when the [CheckBox] is hovered.
  53. </theme_item>
  54. <theme_item name="hover_pressed" type="StyleBox">
  55. The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
  56. </theme_item>
  57. <theme_item name="hseparation" type="int" default="4">
  58. The separation between the check icon and the text (in pixels).
  59. </theme_item>
  60. <theme_item name="normal" type="StyleBox">
  61. The [StyleBox] to display as a background.
  62. </theme_item>
  63. <theme_item name="pressed" type="StyleBox">
  64. The [StyleBox] to display as a background when the [CheckBox] is pressed.
  65. </theme_item>
  66. <theme_item name="radio_checked" type="Texture">
  67. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
  68. </theme_item>
  69. <theme_item name="radio_unchecked" type="Texture">
  70. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
  71. </theme_item>
  72. <theme_item name="unchecked" type="Texture">
  73. The check icon to display when the [CheckBox] is unchecked.
  74. </theme_item>
  75. </theme_items>
  76. </class>