Navigation
API > API/Runtime > API/Runtime/UMG
A simple static text widget.
- No Children
- Text
| Name | UTextBlock |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/TextBlock.h |
| Include Path | #include "Components/TextBlock.h" |
Syntax
UCLASS (Meta=(DisplayName="Text"), MinimalAPI)
class UTextBlock : public UTextLayoutWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UTextLayoutWidget → UTextBlock
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UTextBlock
(
const FObjectInitializer& ObjectInitializer |
Components/TextBlock.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bWrapWithInvalidationPanel | bool | If true, it will automatically wrap this text widget with an invalidation panel | Components/TextBlock.h |
|
| ColorAndOpacity | FSlateColor | The color of the text | Components/TextBlock.h |
|
| ColorAndOpacityDelegate | FGetSlateColor | A bindable delegate for the ColorAndOpacity. | Components/TextBlock.h | |
| Font | FSlateFontInfo | The font to render the text with | Components/TextBlock.h |
|
| MinDesiredWidth | float | The minimum desired size for the text | Components/TextBlock.h |
|
| ShadowColorAndOpacity | FLinearColor | The color of the shadow | Components/TextBlock.h |
|
| ShadowColorAndOpacityDelegate | FGetLinearColor | A bindable delegate for the ShadowColorAndOpacity. | Components/TextBlock.h | |
| ShadowOffset | FVector2D | The direction the shadow is cast | Components/TextBlock.h |
|
| StrikeBrush | FSlateBrush | The brush to strike through text with | Components/TextBlock.h |
|
| Text | FText | The text to display | Components/TextBlock.h |
|
| TextDelegate | FGetText | A bindable delegate to allow logic to drive the text of the widget | Components/TextBlock.h | |
| TextOverflowPolicy | ETextOverflowPolicy | Sets what happens to text that is clipped and doesn't fit within the clip rect for this widget | Components/TextBlock.h |
|
| TextTransformPolicy | ETextTransformPolicy | The text transformation policy to apply to this text block. | Components/TextBlock.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateColor GetColorAndOpacity() |
Components/TextBlock.h | ||
UMaterialInstanceDynamic * GetDynamicFontMaterial() |
Components/TextBlock.h |
|
|
UMaterialInstanceDynamic * GetDynamicOutlineMaterial() |
Components/TextBlock.h |
|
|
const FSlateFontInfo & GetFont() |
Components/TextBlock.h | ||
float GetMinDesiredWidth() |
Components/TextBlock.h | ||
FLinearColor GetShadowColorAndOpacity() |
Components/TextBlock.h | ||
FVector2D GetShadowOffset() |
Components/TextBlock.h | ||
const FSlateBrush & GetStrikeBrush() |
Components/TextBlock.h | ||
FText GetText() |
Gets the widget text | Components/TextBlock.h |
|
ETextOverflowPolicy GetTextOverflowPolicy() |
Components/TextBlock.h | ||
ETextTransformPolicy GetTextTransformPolicy() |
Components/TextBlock.h | ||
void HandleTextCommitted
(
const FText& InText, |
Components/TextBlock.h | ||
void SetAutoWrapText
(
bool InAutoTextWrap |
Set the auto wrap for this text block. | Components/TextBlock.h |
|
void SetColorAndOpacity
(
FSlateColor InColorAndOpacity |
Sets the color and opacity of the text in this text block | Components/TextBlock.h |
|
void SetFont
(
FSlateFontInfo InFontInfo |
Dynamically set the font info for this text block | Components/TextBlock.h |
|
void SetFontMaterial
(
UMaterialInterface* InMaterial |
Components/TextBlock.h |
|
|
void SetFontOutlineMaterial
(
UMaterialInterface* InMaterial |
Components/TextBlock.h |
|
|
void SetMinDesiredWidth
(
float InMinDesiredWidth |
Set the minimum desired width for this text block | Components/TextBlock.h |
|
void SetOpacity
(
float InOpacity |
Sets the opacity of the text in this text block | Components/TextBlock.h |
|
void SetShadowColorAndOpacity
(
FLinearColor InShadowColorAndOpacity |
Sets the color and opacity of the text drop shadow Note: if opacity is zero no shadow will be drawn | Components/TextBlock.h |
|
void SetShadowOffset
(
FVector2D InShadowOffset |
Sets the offset that the text drop shadow should be drawn at | Components/TextBlock.h |
|
void SetStrikeBrush
(
FSlateBrush InStrikeBrush |
Dynamically set the strike brush for this text block | Components/TextBlock.h |
|
| Directly sets the widget text. | Components/TextBlock.h |
|
|
void SetTextOverflowPolicy
(
ETextOverflowPolicy InOverflowPolicy |
Set the text overflow policy for this text block. | Components/TextBlock.h |
|
void SetTextTransformPolicy
(
ETextTransformPolicy InTransformPolicy |
Set the text transformation policy for this text block. | Components/TextBlock.h |
|
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FString GetLabelMetadata() |
Get Label Metadata, which may be as simple as a bit of string data to help identify an anonymous text block. | Components/TextBlock.h | |
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/TextBlock.h | |
virtual void OnCreationFromPalette () |
Called after constructing a new widget from the palette. | Components/TextBlock.h | |
virtual void SynchronizeProperties () |
Applies all properties to the native widget if possible. | Components/TextBlock.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/TextBlock.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanEditChange
(
const FProperty* InProperty |
Components/TextBlock.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TAttribute< FText > GetDisplayText() |
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) | Components/TextBlock.h | |
EVisibility GetTextWarningImageVisibility() |
Components/TextBlock.h | ||
FSlateColor K2_Gate_ColorAndOpacity() |
Components/TextBlock.h | ||
FLinearColor K2_Gate_ShadowColorAndOpacity() |
Components/TextBlock.h | ||
FText K2_Gate_Text() |
Components/TextBlock.h | ||
virtual void OnFontChanged() |
Components/TextBlock.h | ||
virtual void OnTextChanged() |
Components/TextBlock.h |
Overridden from UTextLayoutWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnApplyLineHeightToBottomLineChanged
(
bool InApplyLineHeightToBottomLine |
Components/TextBlock.h | ||
virtual void OnAutoWrapTextChanged
(
bool InAutoWrapText |
Components/TextBlock.h | ||
virtual void OnJustificationChanged
(
ETextJustify::Type InJustification |
Components/TextBlock.h | ||
virtual void OnLineHeightPercentageChanged
(
float InLineHeightPercentage |
Components/TextBlock.h | ||
virtual void OnMarginChanged
(
const FMargin& InMargin |
Components/TextBlock.h | ||
virtual void OnShapedTextOptionsChanged
(
FShapedTextOptions InShapedTextOptions |
Components/TextBlock.h | ||
virtual void OnWrappingPolicyChanged
(
ETextWrappingPolicy InWrappingPolicy |
Components/TextBlock.h | ||
virtual void OnWrapTextAtChanged
(
float InWrapTextAt |
Components/TextBlock.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< SWidget > GetAccessibleWidget() |
Gets the widget that accessibility properties should synchronize to. | Components/TextBlock.h | |
virtual void OnBindingChanged
(
const FName& Property |
Components/TextBlock.h | ||
virtual TSharedRef< SWidget > RebuildWidget() |
Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | Components/TextBlock.h |