FDreamUIStateFaces
One face drawn five ways -- Slate's FButtonStyle shape, which is the thing a control style here
Declared in Public/Controls/DreamControlStyles.h.
One face drawn five ways -- Slate's FButtonStyle shape, which is the thing a control style here could not say.
A control face is a procedural rect with ONE skin on it, and the five states were told apart by colour alone: a project whose normal and pressed buttons are different DRAWINGS had to fork the control. That is the gap this closes, and it closes it without a second state machine -- the selectable already decides which of the five a control is in, and this is only what that decision paints (see UDreamUIControl::UseStateFaces).
EVERY FIELD IS OPTIONAL, and that is what makes it change nothing that already exists. A state whose brush holds no image falls back to Normal's, and a Normal holding none falls back to the control's own single brush -- so a style that says nothing here draws exactly what it drew before, down to the pixel. The same is true of the other three groups: the foreground tint is gated on a bit that ships off, the pressed padding on another, and the three sounds are null.
Shared rather than per-control because a project's buttons, check boxes, dropdown faces and list rows are the same decision made once. It is a FIELD of each of those styles rather than a base struct: a USTRUCT hierarchy would not survive the override-bit merge, which reads one struct's properties and writes the ticked ones onto another of the same type.
Properties
| Name | Type | Category | In the details panel | From Blueprint | Description |
|---|---|---|---|---|---|
Normal | FDreamUIFaceBrush | State Faces | yes | read / write | The resting skin. Empty means the control's own brush, which is what every style ships with. |
Hovered | FDreamUIFaceBrush | State Faces | yes | read / write | Pointer resting on it. Empty falls back to Normal. |
Pressed | FDreamUIFaceBrush | State Faces | yes | read / write | |
Disabled | FDreamUIFaceBrush | State Faces | yes | read / write | |
Focused | FDreamUIFaceBrush | State Faces | yes | read / write | Holding keyboard or gamepad focus, which is a different question from hovered -- focus survives the pointer leaving, and on a pad there is no pointer at all. |
bTintForeground | bool | State Faces | yes | read / write | Whether the five colours below are pushed at all. |
NormalForeground | FColor | State Faces | yes | read / write | What the control's FOREGROUND part -- its own label or glyph, never a host's content -- is tinted in each state. Slate's ForegroundColor, per state as FButtonStyle has it. |
HoveredForeground | FColor | State Faces | yes | read / write | |
PressedForeground | FColor | State Faces | yes | read / write | |
DisabledForeground | FColor | State Faces | yes | read / write | |
FocusedForeground | FColor | State Faces | yes | read / write | |
bUsePressedPadding | bool | State Faces | yes | read / write | Whether PressedPadding is used at all. Off, a pressed control keeps its resting padding. |
PressedPadding | FMargin | State Faces | yes | read / write | What surrounds the content WHILE PRESSED -- Slate's PressedPadding, and the classic way a button looks pushed in: a top-heavy margin nudges the label down a pixel. The resting number is the control's own ContentPadding rather than a second copy here; see UDreamButton. |
HoveredSound | TObjectPtr<USoundBase> | State Faces | yes | read / write | The three moments a control makes a noise, as a STYLE decision: a click should sound like the other clicks in this UI, which is the same argument the colours make. |
PressedSound | TObjectPtr<USoundBase> | State Faces | yes | read / write | |
ClickedSound | TObjectPtr<USoundBase> | State Faces | yes | read / write |