CheckButton

继承: Button < BaseButton < Control < CanvasItem < Node < Object

A button that represents a binary choice.

描述

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 immediate 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.

属性

HorizontalAlignmentalignment
booltoggle_mode

主题属性


主题属性说明

int check_v_offset = 0

The vertical offset used when rendering the toggle icons (in pixels).


Texture2D checked

The icon to display when the CheckButton is checked (for left-to-right layouts).


Texture2D checked_disabled

The icon to display when the CheckButton is checked and disabled (for left-to-right layouts).


Texture2D checked_disabled_mirrored

The icon to display when the CheckButton is checked and disabled (for right-to-left layouts).


Texture2D checked_mirrored

The icon to display when the CheckButton is checked (for right-to-left layouts).


Texture2D unchecked

The icon to display when the CheckButton is unchecked (for left-to-right layouts).


Texture2D unchecked_disabled

The icon to display when the CheckButton is unchecked and disabled (for left-to-right layouts).


Texture2D unchecked_disabled_mirrored

The icon to display when the CheckButton is unchecked and disabled (for right-to-left layouts).


Texture2D unchecked_mirrored

The icon to display when the CheckButton is unchecked (for right-to-left layouts).

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。