CheckButton
Inherits: Button < BaseButton < Control < CanvasItem < Node < Object
可检查的按钮。另请参阅CheckBox。
描述
CheckButton是一个切换按钮,显示为一个可选字段。它在功能上类似于CheckBox,但外观不同。为了遵循用户体验,建议在切换它对某些东西有直接影响时使用CheckButton。例如,如果切换它可以启用或禁用设置而不需要用户按下确认按钮时,使用它。
参阅BaseButton,它包含了与该节点相关的常规属性和方法。
属性
align |
| |
toggle_mode |
|
主题属性
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
Theme Property Descriptions
- Color font_color
Default |
|
CheckButton
文本的字体颜色。
- Color font_color_disabled
Default |
|
CheckButton
文本在禁用时的字体颜色。
- Color font_color_focus
Default |
|
CheckButton
文本获得焦点时的字体颜色。仅替换按钮的正常文本颜色。禁用、悬停和按下状态优先于此颜色。
- Color font_color_hover
Default |
|
悬停时CheckButton
文本的字体颜色。
- Color font_color_hover_pressed
Default |
|
当CheckButton
被悬停和按下时,其文本的字体颜色。
- Color font_color_pressed
Default |
|
按下CheckButton
时文本的字体颜色。
- int check_vadjust
Default |
|
渲染切换图标时使用的垂直偏移量(以像素为单位)。
- int hseparation
Default |
|
切换图标和文本之间的分隔(以像素为单位)。
- Font font
用于CheckButton
文本的Font。
- Texture off
未选中CheckButton
时显示的图标。
- Texture off_disabled
未选中和禁用CheckButton
时显示的图标。
- Texture on
选中CheckButton
时显示的图标。
- Texture on_disabled
选中并禁用CheckButton
时显示的图标。
- StyleBox disabled
当CheckButton
被禁用时,作为背景显示的StyleBox。
- StyleBox focus
当CheckButton
被聚焦时作为背景显示的StyleBox。
- StyleBox hover
当CheckButton
被悬停时作为背景显示的StyleBox。
- StyleBox hover_pressed
当CheckButton
被悬停和按下时作为背景显示的StyleBox。
- StyleBox normal
StyleBox显示为背景。
- StyleBox pressed
当CheckButton
被按下时作为背景显示的StyleBox。