godot/doc/classes/CheckButton.xml
Nông Văn Tình 4632cfd4bd Allow modification of the color for the checkbox's checked and unchecked icons
Occasionally, the default white color for the icon does not meet our needs, and we would like to change it. However, the CheckBox does not currently have a mechanism to modify this color.
2024-12-15 22:19:13 +07:00

51 lines
3.1 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="CheckButton" 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>
[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.
See also [BaseButton] which contains common properties and methods associated with this node.
</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="button_checked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color of the checked icon when the checkbox is pressed.
</theme_item>
<theme_item name="button_unchecked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color of the unchecked icon when the checkbox is not pressed.
</theme_item>
<theme_item name="check_v_offset" data_type="constant" type="int" default="0">
The vertical offset used when rendering the toggle icons (in pixels).
</theme_item>
<theme_item name="checked" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked (for left-to-right layouts).
</theme_item>
<theme_item name="checked_disabled" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked and disabled (for left-to-right layouts).
</theme_item>
<theme_item name="checked_disabled_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked and disabled (for right-to-left layouts).
</theme_item>
<theme_item name="checked_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked (for right-to-left layouts).
</theme_item>
<theme_item name="unchecked" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked (for left-to-right layouts).
</theme_item>
<theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked and disabled (for left-to-right layouts).
</theme_item>
<theme_item name="unchecked_disabled_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked and disabled (for right-to-left layouts).
</theme_item>
<theme_item name="unchecked_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked (for right-to-left layouts).
</theme_item>
</theme_items>
</class>