0.2.0-dev Download ZIP
52 lines ·3.2 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="CheckBox" inherits="Button" api_type="core" 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 | [CheckBox] allows the user to choose one of only 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 example, it could 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 | When [member BaseButton.button_group] specifies a [ButtonGroup], [CheckBox] changes its appearance to that of a radio button and uses the various [code]radio_*[/code] theme properties. |
| 10 | </description> |
| 11 | <tutorials> |
| 12 | </tutorials> |
| 13 | <members> |
| 14 | <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" /> |
| 15 | <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" /> |
| 16 | </members> |
| 17 | <theme_items> |
| 18 | <theme_item name="checkbox_checked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> |
| 19 | The color of the checked icon when the checkbox is pressed. |
| 20 | </theme_item> |
| 21 | <theme_item name="checkbox_unchecked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> |
| 22 | The color of the unchecked icon when the checkbox is not pressed. |
| 23 | </theme_item> |
| 24 | <theme_item name="check_v_offset" data_type="constant" type="int" default="0"> |
| 25 | The vertical offset used when rendering the check icons (in pixels). |
| 26 | </theme_item> |
| 27 | <theme_item name="checked" data_type="icon" type="Texture2D"> |
| 28 | The check icon to display when the [CheckBox] is checked. |
| 29 | </theme_item> |
| 30 | <theme_item name="checked_disabled" data_type="icon" type="Texture2D"> |
| 31 | The check icon to display when the [CheckBox] is checked and is disabled. |
| 32 | </theme_item> |
| 33 | <theme_item name="radio_checked" data_type="icon" type="Texture2D"> |
| 34 | The check icon to display when the [CheckBox] is configured as a radio button and is checked. |
| 35 | </theme_item> |
| 36 | <theme_item name="radio_checked_disabled" data_type="icon" type="Texture2D"> |
| 37 | The check icon to display when the [CheckBox] is configured as a radio button, is disabled, and is unchecked. |
| 38 | </theme_item> |
| 39 | <theme_item name="radio_unchecked" data_type="icon" type="Texture2D"> |
| 40 | The check icon to display when the [CheckBox] is configured as a radio button and is unchecked. |
| 41 | </theme_item> |
| 42 | <theme_item name="radio_unchecked_disabled" data_type="icon" type="Texture2D"> |
| 43 | The check icon to display when the [CheckBox] is configured as a radio button, is disabled, and is unchecked. |
| 44 | </theme_item> |
| 45 | <theme_item name="unchecked" data_type="icon" type="Texture2D"> |
| 46 | The check icon to display when the [CheckBox] is unchecked. |
| 47 | </theme_item> |
| 48 | <theme_item name="unchecked_disabled" data_type="icon" type="Texture2D"> |
| 49 | The check icon to display when the [CheckBox] is unchecked and is disabled. |
| 50 | </theme_item> |
| 51 | </theme_items> |
| 52 | </class> |