47 lines
2.9 KiB
XML
47 lines
2.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="CheckBox" inherits="Button" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
A button that represents a binary choice.
|
|
</brief_description>
|
|
<description>
|
|
[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.
|
|
See also [BaseButton] which contains common properties and methods associated with this node.
|
|
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.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<members>
|
|
<member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
|
|
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
|
|
</members>
|
|
<theme_items>
|
|
<theme_item name="check_v_offset" data_type="constant" type="int" default="0">
|
|
The vertical offset used when rendering the check icons (in pixels).
|
|
</theme_item>
|
|
<theme_item name="checked" data_type="icon" type="Texture2D">
|
|
The check icon to display when the [CheckBox] is checked.
|
|
</theme_item>
|
|
<theme_item name="checked_disabled" data_type="icon" type="Texture2D">
|
|
The check icon to display when the [CheckBox] is checked and is disabled.
|
|
</theme_item>
|
|
<theme_item name="radio_checked" data_type="icon" type="Texture2D">
|
|
The check icon to display when the [CheckBox] is configured as a radio button and is checked.
|
|
</theme_item>
|
|
<theme_item name="radio_checked_disabled" data_type="icon" type="Texture2D">
|
|
The check icon to display when the [CheckBox] is configured as a radio button, is disabled, and is unchecked.
|
|
</theme_item>
|
|
<theme_item name="radio_unchecked" data_type="icon" type="Texture2D">
|
|
The check icon to display when the [CheckBox] is configured as a radio button and is unchecked.
|
|
</theme_item>
|
|
<theme_item name="radio_unchecked_disabled" data_type="icon" type="Texture2D">
|
|
The check icon to display when the [CheckBox] is configured as a radio button, is disabled, and is unchecked.
|
|
</theme_item>
|
|
<theme_item name="unchecked" data_type="icon" type="Texture2D">
|
|
The check icon to display when the [CheckBox] is unchecked.
|
|
</theme_item>
|
|
<theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
|
|
The check icon to display when the [CheckBox] is unchecked and is disabled.
|
|
</theme_item>
|
|
</theme_items>
|
|
</class>
|