2
0

CheckBox.xml 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CheckBox" inherits="Button" version="4.0">
  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. <members>
  13. <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
  14. <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
  15. </members>
  16. <theme_items>
  17. <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
  18. The vertical offset used when rendering the check icons (in pixels).
  19. </theme_item>
  20. <theme_item name="checked" data_type="icon" type="Texture2D">
  21. The check icon to display when the [CheckBox] is checked.
  22. </theme_item>
  23. <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
  24. The check icon to display when the [CheckBox] is checked and disabled.
  25. </theme_item>
  26. <theme_item name="disabled" data_type="style" type="StyleBox">
  27. The [StyleBox] to display as a background when the [CheckBox] is disabled.
  28. </theme_item>
  29. <theme_item name="focus" data_type="style" type="StyleBox">
  30. The [StyleBox] to display as a background when the [CheckBox] is focused.
  31. </theme_item>
  32. <theme_item name="font" data_type="font" type="Font">
  33. The [Font] to use for the [CheckBox] text.
  34. </theme_item>
  35. <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
  36. The [CheckBox] text's font color.
  37. </theme_item>
  38. <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
  39. The [CheckBox] text's font color when it's disabled.
  40. </theme_item>
  41. <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
  42. 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.
  43. </theme_item>
  44. <theme_item name="font_hover_color" data_type="color" 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_hover_pressed_color" data_type="color" 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_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  51. The tint of text outline of the [CheckBox].
  52. </theme_item>
  53. <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  54. The [CheckBox] text's font color when it's pressed.
  55. </theme_item>
  56. <theme_item name="font_size" data_type="font_size" type="int">
  57. Font size of the [CheckBox]'s text.
  58. </theme_item>
  59. <theme_item name="hover" data_type="style" type="StyleBox">
  60. The [StyleBox] to display as a background when the [CheckBox] is hovered.
  61. </theme_item>
  62. <theme_item name="hover_pressed" data_type="style" type="StyleBox">
  63. The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
  64. </theme_item>
  65. <theme_item name="hseparation" data_type="constant" type="int" default="4">
  66. The separation between the check icon and the text (in pixels).
  67. </theme_item>
  68. <theme_item name="normal" data_type="style" type="StyleBox">
  69. The [StyleBox] to display as a background.
  70. </theme_item>
  71. <theme_item name="outline_size" data_type="constant" type="int" default="0">
  72. The size of the text outline.
  73. </theme_item>
  74. <theme_item name="pressed" data_type="style" type="StyleBox">
  75. The [StyleBox] to display as a background when the [CheckBox] is pressed.
  76. </theme_item>
  77. <theme_item name="radio_checked" data_type="icon" type="Texture2D">
  78. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
  79. </theme_item>
  80. <theme_item name="radio_checked_disabled" data_type="icon" type="Texture2D">
  81. </theme_item>
  82. <theme_item name="radio_unchecked" data_type="icon" type="Texture2D">
  83. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
  84. </theme_item>
  85. <theme_item name="radio_unchecked_disabled" data_type="icon" type="Texture2D">
  86. </theme_item>
  87. <theme_item name="unchecked" data_type="icon" type="Texture2D">
  88. The check icon to display when the [CheckBox] is unchecked.
  89. </theme_item>
  90. <theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
  91. The check icon to display when the [CheckBox] is unchecked and disabled.
  92. </theme_item>
  93. </theme_items>
  94. </class>