CheckButton.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CheckButton" inherits="Button" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. A button that represents a binary choice.
  5. </brief_description>
  6. <description>
  7. [CheckButton] is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use [CheckButton] when toggling it has an [b]immediate[/b] effect on something. For example, it can be used when pressing it shows or hides advanced settings, without asking the user to confirm this action.
  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="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
  14. <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
  15. </members>
  16. <theme_items>
  17. <theme_item name="button_checked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  18. The color of the checked icon when the checkbox is pressed.
  19. </theme_item>
  20. <theme_item name="button_unchecked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  21. The color of the unchecked icon when the checkbox is not pressed.
  22. </theme_item>
  23. <theme_item name="check_v_offset" data_type="constant" type="int" default="0">
  24. The vertical offset used when rendering the toggle icons (in pixels).
  25. </theme_item>
  26. <theme_item name="checked" data_type="icon" type="Texture2D">
  27. The icon to display when the [CheckButton] is checked (for left-to-right layouts).
  28. </theme_item>
  29. <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
  30. The icon to display when the [CheckButton] is checked and disabled (for left-to-right layouts).
  31. </theme_item>
  32. <theme_item name="checked_disabled_mirrored" data_type="icon" type="Texture2D">
  33. The icon to display when the [CheckButton] is checked and disabled (for right-to-left layouts).
  34. </theme_item>
  35. <theme_item name="checked_mirrored" data_type="icon" type="Texture2D">
  36. The icon to display when the [CheckButton] is checked (for right-to-left layouts).
  37. </theme_item>
  38. <theme_item name="unchecked" data_type="icon" type="Texture2D">
  39. The icon to display when the [CheckButton] is unchecked (for left-to-right layouts).
  40. </theme_item>
  41. <theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
  42. The icon to display when the [CheckButton] is unchecked and disabled (for left-to-right layouts).
  43. </theme_item>
  44. <theme_item name="unchecked_disabled_mirrored" data_type="icon" type="Texture2D">
  45. The icon to display when the [CheckButton] is unchecked and disabled (for right-to-left layouts).
  46. </theme_item>
  47. <theme_item name="unchecked_mirrored" data_type="icon" type="Texture2D">
  48. The icon to display when the [CheckButton] is unchecked (for right-to-left layouts).
  49. </theme_item>
  50. </theme_items>
  51. </class>