Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Components
Inheritance Hierarchy
- UObject
- UVisual
- UWidget
- UTextLayoutWidget
- UTextBlock
References
| Module | UMG |
| Header | /Engine/Source/Runtime/UMG/Public/Components/TextBlock.h |
| Include | #include "Components/TextBlock.h" |
Syntax
UCLASS (Meta=(DisplayName="Text"), MinimalAPI)
class UTextBlock : public UTextLayoutWidget
Remarks
A simple static text widget.
- No Children
- Text
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bSimpleTextMode | If this is enabled, text shaping, wrapping, justification are disabled in favor of much faster text layout and measurement. | |
| bool | bWrapWithInvalidationPanel | If true, it will automatically wrap this text widget with an invalidation panel | |
| FSlateColor | ColorAndOpacity | The color of the text | |
| FGetSlateColor | ColorAndOpacityDelegate | A bindable delegate for the ColorAndOpacity. | |
| FSlateFontInfo | Font | The font to render the text with | |
| FSlateColor | K2_Cache_ColorAndOpacity | ||
| FLinearColor | K2_Cache_ShadowColorAndOpacity | ||
| FText | K2_Cache_Text | ||
| float | MinDesiredWidth | The minimum desired size for the text | |
| TSharedPtr< STextBlock > | MyTextBlock | ||
| FLinearColor | ShadowColorAndOpacity | The color of the shadow | |
| FGetLinearColor | ShadowColorAndOpacityDelegate | A bindable delegate for the ShadowColorAndOpacity. | |
| FVector2D | ShadowOffset | The direction the shadow is cast | |
| FSlateBrush | StrikeBrush | The brush to strike through text with | |
| FText | Text | The text to display | |
| FGetText | TextDelegate | A bindable delegate to allow logic to drive the text of the widget | |
| ETextOverflowPolicy | TextOverflowPolicy | Sets what happens to text that is clipped and doesn't fit within the clip rect for this widget | |
| ETextTransformPolicy | TextTransformPolicy | The text transformation policy to apply to this text block. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UTextBlock
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | CanEditChange
(
const FProperty* InProperty |
||
| FSlateColor | |||
| TAttribute< FText > | Get the text that should be displayed in the internal Slate widget (allows flags to mutate the display text without modifying the persistent designer property data) | ||
| UMaterialInstanceDynamic * | |||
| UMaterialInstanceDynamic * | |||
| const FSlateFontInfo & | GetFont () |
||
| float | |||
| FLinearColor | |||
| FVector2D | |||
| const FSlateBrush & | |||
| FText | GetText () |
Gets the widget text | |
| ETextOverflowPolicy | |||
| ETextTransformPolicy | |||
| EVisibility | |||
| void | HandleTextCommitted
(
const FText& InText, |
||
| FSlateColor | |||
| FLinearColor | |||
| FText | K2_Gate_Text () |
||
| void | |||
| void | |||
| void | SetAutoWrapText
(
bool InAutoTextWrap |
Set the auto wrap for this text block. | |
| void | SetColorAndOpacity
(
FSlateColor InColorAndOpacity |
Sets the color and opacity of the text in this text block | |
| void | SetFont
(
FSlateFontInfo InFontInfo |
Dynamically set the font info for this text block | |
| void | SetFontMaterial
(
UMaterialInterface* InMaterial |
||
| void | SetFontOutlineMaterial
(
UMaterialInterface* InMaterial |
||
| void | SetMinDesiredWidth
(
float InMinDesiredWidth |
Set the minimum desired width for this text block | |
| void | SetOpacity
(
float InOpacity |
Sets the opacity of the text in this text block | |
| void | SetShadowColorAndOpacity
(
FLinearColor InShadowColorAndOpacity |
Sets the color and opacity of the text drop shadow Note: if opacity is zero no shadow will be drawn | |
| void | SetShadowOffset
(
FVector2D InShadowOffset |
Sets the offset that the text drop shadow should be drawn at | |
| void | SetStrikeBrush
(
FSlateBrush InStrikeBrush |
Dynamically set the strike brush for this text block | |
| void | SetText
(
FText InText |
Directly sets the widget text. | |
| void | SetTextOverflowPolicy
(
ETextOverflowPolicy InOverflowPolicy |
Set the text overflow policy for this text block. | |
| void | SetTextTransformPolicy
(
ETextTransformPolicy InTransformPolicy |
Set the text transformation policy for this text block. |
Overridden from UTextLayoutWidget
| Type | Name | Description | |
|---|---|---|---|
| void | OnApplyLineHeightToBottomLineChanged
(
bool InApplyLineHeightToBottomLine |
||
| void | OnAutoWrapTextChanged
(
bool InAutoWrapText |
||
| void | OnJustificationChanged
(
ETextJustify::Type InJustification |
||
| void | OnLineHeightPercentageChanged
(
float InLineHeightPercentage |
||
| void | OnMarginChanged
(
const FMargin& InMargin |
||
| void | OnShapedTextOptionsChanged
(
FShapedTextOptions InShapedTextOptions |
||
| void | OnWrappingPolicyChanged
(
ETextWrappingPolicy InWrappingPolicy |
||
| void | OnWrapTextAtChanged
(
float InWrapTextAt |
Overridden from UWidget
| Type | Name | Description | |
|---|---|---|---|
| FString | Get Label Metadata, which may be as simple as a bit of string data to help identify an anonymous text block. | ||
| const FText | Gets the palette category of the widget | ||
| void | OnBindingChanged
(
const FName& Property |
||
| void | Called after constructing a new widget from the palette. | ||
| TSharedRef< SWidget > | Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | ||
| void | Applies all properties to the native widget if possible. |
Overridden from UVisual
| Type | Name | Description | |
|---|---|---|---|
| void | ReleaseSlateResources
(
bool bReleaseChildren |