Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Components
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UVisual
- UWidget
- UTextLayoutWidget
- UTextBlock
- UCommonTextBlock
- UCommonDateTimeTextBlock
- UCommonNumericTextBlock
References
| Module | UMG |
| Header | /Engine/Source/Runtime/UMG/Public/Components/TextBlock.h |
| Include | #include "Components/TextBlock.h" |
Syntax
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 | |
| FGetSlateColor | ColorAndOpacityDelegate | A bindable delegate for the ColorAndOpacity. | |
| FSlateColor | K2_Cache_ColorAndOpacity | ||
| FLinearColor | K2_Cache_ShadowColorAndOpacity | ||
| FText | K2_Cache_Text | ||
| TSharedPtr< STextBlock > | MyTextBlock | ||
| FGetLinearColor | ShadowColorAndOpacityDelegate | A bindable delegate for the ShadowColorAndOpacity. | |
| FGetText | TextDelegate | A bindable delegate to allow logic to drive the text of the widget |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UTextBlock
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| 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 | 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 | SetJustification
(
ETextJustify::Type InJustification |
Overridden from UWidget
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< SWidget > | Gets the widget that accessibility properties should synchronize to. | ||
| 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 |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| bool | CanEditChange
(
const FProperty* InProperty |
Called by the editor to query whether a property of this object is allowed to be modified. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| FSlateColor | ColorAndOpacity | Direct access to ColorAndOpacity is deprecated. Please use the getter or setter. | |
| FSlateFontInfo | Font | Direct access to Font is deprecated. Please use the getter or setter. | |
| float | MinDesiredWidth | Direct access to MinDesiredWidth is deprecated. Please use the getter or setter. | |
| FLinearColor | ShadowColorAndOpacity | Direct access to ShadowColorAndOpacity is deprecated. Please use the getter or setter. | |
| FVector2D | ShadowOffset | Direct access to ShadowOffset is deprecated. Please use the getter or setter. | |
| FSlateBrush | StrikeBrush | Direct access to StrikeBrush is deprecated. Please use the getter or setter. | |
| FText | Text | Direct access to Text is deprecated. Please use the getter or setter. | |
| ETextOverflowPolicy | TextOverflowPolicy | Direct access to TextOverflowPolicy is deprecated. Please use the getter or setter. | |
| ETextTransformPolicy | TextTransformPolicy | Direct access to TextTransformPolicy is deprecated. Please use the getter or setter. |