CheckBox.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CheckBox" inherits="Button" version="3.2">
  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 apperance. 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. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. </methods>
  13. <members>
  14. <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
  15. <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
  16. </members>
  17. <constants>
  18. </constants>
  19. <theme_items>
  20. <theme_item name="check_vadjust" type="int" default="0">
  21. The vertical offset used when rendering the check icons (in pixels).
  22. </theme_item>
  23. <theme_item name="checked" type="Texture">
  24. The check icon to display when the [CheckBox] is checked.
  25. </theme_item>
  26. <theme_item name="disabled" type="StyleBox">
  27. The [StyleBox] to display as a background when the [CheckBox] is disabled.
  28. </theme_item>
  29. <theme_item name="focus" type="StyleBox">
  30. The [StyleBox] to display as a background when the [CheckBox] is focused.
  31. </theme_item>
  32. <theme_item name="font" type="Font">
  33. The [Font] to use for the [CheckBox] text.
  34. </theme_item>
  35. <theme_item name="font_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_color_disabled" 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_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  42. The [CheckBox] text's font color when it's hovered.
  43. </theme_item>
  44. <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
  45. The [CheckBox] text's font color when it's hovered and pressed.
  46. </theme_item>
  47. <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
  48. The [CheckBox] text's font color when it's pressed.
  49. </theme_item>
  50. <theme_item name="hover" type="StyleBox">
  51. The [StyleBox] to display as a background when the [CheckBox] is hovered.
  52. </theme_item>
  53. <theme_item name="hover_pressed" type="StyleBox">
  54. The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
  55. </theme_item>
  56. <theme_item name="hseparation" type="int" default="4">
  57. The separation between the check icon and the text (in pixels).
  58. </theme_item>
  59. <theme_item name="normal" type="StyleBox">
  60. The [StyleBox] to display as a background.
  61. </theme_item>
  62. <theme_item name="pressed" type="StyleBox">
  63. The [StyleBox] to display as a background when the [CheckBox] is pressed.
  64. </theme_item>
  65. <theme_item name="radio_checked" type="Texture">
  66. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
  67. </theme_item>
  68. <theme_item name="radio_unchecked" type="Texture">
  69. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
  70. </theme_item>
  71. <theme_item name="unchecked" type="Texture">
  72. The check icon to display when the [CheckBox] is unchecked.
  73. </theme_item>
  74. </theme_items>
  75. </class>