类参考
FDreamToggleStyle
What a toggle looks like, separated from what it is.
本页由 DreamGUIReferenceDocs commandlet 从反射生成,正文是头文件注释的原文(英文),所以不翻译——这样它永远和代码一致。概念讲解见核心概念。
Declared in Public/Controls/DreamControlStyles.h.
What a toggle looks like, separated from what it is.
This is the FButtonStyle shape, and it exists for the reason Slate's does: the control assembles itself, so every appearance decision has to be a knob or it is a fork. The box and the tick have separate colour sets because they carry separate transitions -- the pointer one tints the box, the checked one tints the tick, and one visual cannot hold both.
Properties
| Name | Type | Category | In the details panel | From Blueprint | Description |
|---|---|---|---|---|---|
BoxSize | FVector2D | Toggle Style | yes | read / write | |
TickSize | FVector2D | Toggle Style | yes | read / write | |
BoxNormal | FColor | Toggle Style | yes | read / write | |
BoxHovered | FColor | Toggle Style | yes | read / write | |
BoxPressed | FColor | Toggle Style | yes | read / write | |
BoxDisabled | FColor | Toggle Style | yes | read / write | |
BoxFocused | FColor | Toggle Style | yes | read / write | |
TransitionDuration | float | Toggle Style | yes | read / write | |
TickChecked | FColor | Toggle Style | yes | read / write | |
TickUnchecked | FColor | Toggle Style | yes | read / write | |
CornerRadius | float | Toggle Style | yes | read / write | |
BoxBrush | FDreamUIFaceBrush | Toggle Style | yes | read / write | |
CheckedBrush | FDreamUIFaceBrush | Toggle Style | yes | read / write | |
UncheckedBrush | FDreamUIFaceBrush | Toggle Style | yes | read / write | |
UndeterminedBrush | FDreamUIFaceBrush | Toggle Style | yes | read / write | |
StateFaces | FDreamUIStateFaces | Toggle Style | yes | read / write |