IconText

IconText

#Overview

name: IconText

The value of this variable can be defined or overridden in .ini config files. 5 .ini config files referencing this setting variable.

It is referenced in 19 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of IconText is to provide a textual representation of an icon for various UI elements in the Unreal Engine 5 editor. This variable is primarily used for displaying icons in the user interface, such as in toolbars, property panels, and custom widgets.

IconText is utilized by several Unreal Engine subsystems and modules, including:

  1. The Source Filtering Editor plugin
  2. The Dataprep Editor plugin
  3. The Datasmith Importer plugin
  4. The Level Editor
  5. The Persona animation editor
  6. The Core module’s Data-Driven Platform Info system

The value of IconText is typically set in different ways depending on the context:

  1. In some cases, it’s set directly in the code, such as in the FilterDragDropOperation class.
  2. In UI customization code, it’s often set using lambda functions that determine the appropriate icon based on certain conditions.
  3. For the Data-Driven Platform Info system, it’s read from configuration files.

IconText often interacts with other variables and systems:

  1. It’s frequently used alongside other text variables like tooltips and labels.
  2. It’s often part of a larger UI structure, such as in custom detail views or timeline tracks.
  3. In some cases, it’s used in conjunction with font styles, particularly “FontAwesome” for icon glyphs.

Developers should be aware of the following when using IconText:

  1. The text often represents Unicode characters for icons, so proper font support is crucial.
  2. The value of IconText may change dynamically based on the state of the application or the element it represents.
  3. It’s important to provide meaningful icons that enhance the user experience and convey information effectively.

Best practices for using IconText include:

  1. Use consistent icon representations across the application for similar actions or states.
  2. Provide tooltips or additional context when using icons to ensure clarity.
  3. Consider accessibility and ensure that important information is not conveyed solely through icons.
  4. Use appropriate sizing and styling to ensure icons are clearly visible and distinguishable.
  5. When possible, use standard icon sets (like FontAwesome) for consistency and ease of maintenance.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:31, section: [PreviewPlatform AndroidES31]

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:42, section: [PreviewPlatform AndroidVulkan]

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:53, section: [PreviewPlatform AndroidVulkanSM5]

Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:34, section: [PreviewPlatform IOSMetal]

Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:46, section: [PreviewPlatform IOSMetalSM5]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Developer/TraceSourceFiltering/Source/SourceFilteringEditor/Private/FilterDragDropOperation.h:52

Scope (from outer to inner):

file
class        class FFilterDragDropOp : public FDragDropOperation
function     FText GetIconText

Source code excerpt:

	FText GetIconText() const
	{
		return IconText;
	}

	void SetIconText(FText InText)
	{
		IconText = InText;
	}

	void SetText(FText InText)
	{
		Text = InText;
	}

#Loc: <Workspace>/Engine/Plugins/Developer/TraceSourceFiltering/Source/SourceFilteringEditor/Private/FilterDragDropOperation.h:68

Scope (from outer to inner):

file
class        class FFilterDragDropOp : public FDragDropOperation
function     void Reset

Source code excerpt:

	{
		Text = FText::FromString(TEXT("Invalid Operation"));
		IconText = FText::FromString(FString(TEXT("\xf05e")));
	}
	
	static TSharedRef<FFilterDragDropOp> New(TSharedRef<class IFilterObject> InFilterObject)
	{
		TSharedRef<FFilterDragDropOp> Operation = MakeShareable(new FFilterDragDropOp);
		Operation->FilterObject = InFilterObject;

#Loc: <Workspace>/Engine/Plugins/Developer/TraceSourceFiltering/Source/SourceFilteringEditor/Private/FilterDragDropOperation.h:81

Scope (from outer to inner):

file
class        class FFilterDragDropOp : public FDragDropOperation

Source code excerpt:


private:
	FText IconText;
	FText Text;
};

#Loc: <Workspace>/Engine/Plugins/Enterprise/DataprepEditor/Source/DataprepCore/Private/InterchangeFileProducer.cpp:498

Scope (from outer to inner):

file
function     void FInterchangeFileProducerDetails::CustomizeDetails

Source code excerpt:

	FDetailWidgetRow& CustomAssetImportRow = ImportSettingsCategoryBuilder.AddCustomRow( FText::FromString( TEXT( "Import File" ) ) );

	TSharedPtr<STextBlock> IconText;

	CustomAssetImportRow.NameContent()
	[
		SNew(SHorizontalBox)
		+ SHorizontalBox::Slot()
		.VAlign(VAlign_Center)

#Loc: <Workspace>/Engine/Plugins/Enterprise/DataprepEditor/Source/DataprepCore/Private/InterchangeFileProducer.cpp:530

Scope (from outer to inner):

file
function     void FInterchangeFileProducerDetails::CustomizeDetails

Source code excerpt:

		.AutoWidth()
		[
			SAssignNew(IconText, STextBlock)
				.Font(FAppStyle::Get().GetFontStyle("FontAwesome.11"))
				.Text(MakeAttributeLambda([this]
				{
					return this->IsProducerSuperseded() ? FEditorFontGlyphs::Exclamation_Triangle : FEditorFontGlyphs::File;
				}))
				.ColorAndOpacity(this, &FInterchangeContentProducerDetails::GetStatusColorAndOpacity)

#Loc: <Workspace>/Engine/Plugins/Enterprise/DataprepEditor/Source/DataprepCore/Private/InterchangeFileProducer.cpp:540

Scope (from outer to inner):

file
function     void FInterchangeFileProducerDetails::CustomizeDetails

Source code excerpt:

	];

	IconText->SetToolTipText(MakeAttributeLambda([this]
	{
		if (IsProducerSuperseded())
		{
			return LOCTEXT("FInterchangeFileProducerDetails_StatusTextTooltip_Superseded", "This producer is superseded by another one and will be skipped when run.");
		}
		return LOCTEXT("FInterchangeFileProducerDetails_StatusTextTooltip", "File input");

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Private/DatasmithFileProducer.cpp:1571

Scope (from outer to inner):

file
function     void FDatasmithFileProducerDetails::CustomizeDetails

Source code excerpt:

	FDetailWidgetRow& CustomAssetImportRow = ImportSettingsCategoryBuilder.AddCustomRow( FText::FromString( TEXT( "Import File" ) ) );

	TSharedPtr<STextBlock> IconText;

	TArray<TObjectPtr<UDatasmithOptionsBase>> Options = FileProducer->GetTranslatorImportOptions();

	CustomAssetImportRow.NameContent()
	[
		SNew(SHorizontalBox)

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Private/DatasmithFileProducer.cpp:1605

Scope (from outer to inner):

file
function     void FDatasmithFileProducerDetails::CustomizeDetails

Source code excerpt:

		.AutoWidth()
		[
			SAssignNew(IconText, STextBlock)
				.Font(FAppStyle::Get().GetFontStyle("FontAwesome.11"))
				.Text(MakeAttributeLambda([this]
				{
					return IsProducerSuperseded() ? FEditorFontGlyphs::Exclamation_Triangle : FEditorFontGlyphs::File;
				}))
				.ColorAndOpacity(this, &FDataprepContentProducerDetails::GetStatusColorAndOpacity)

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Private/DatasmithFileProducer.cpp:1615

Scope (from outer to inner):

file
function     void FDatasmithFileProducerDetails::CustomizeDetails

Source code excerpt:

	];

	IconText->SetToolTipText(MakeAttributeLambda([this]
	{
		if (IsProducerSuperseded())
		{
			return LOCTEXT("FDatasmithFileProducerDetails_StatusTextTooltip_Superseded", "This producer is superseded by another one and will be skipped when run.");
		}
		return LOCTEXT("FDatasmithFileProducerDetails_StatusTextTooltip", "File input");

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Private/DatasmithFileProducer.cpp:1797

Scope (from outer to inner):

file
function     void FDatasmithDirProducerDetails::CustomizeDetails

Source code excerpt:

	FDetailWidgetRow& CustomAssetImportRow = ImportSettingsCategoryBuilder.AddCustomRow( FText::FromString( TEXT( "Import Folder" ) ) );

	TSharedPtr<STextBlock> IconText;

	CustomAssetImportRow.NameContent()
	[
		SNew(SHorizontalBox)
		+ SHorizontalBox::Slot()
		.VAlign(VAlign_Top)

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Private/DatasmithFileProducer.cpp:1828

Scope (from outer to inner):

file
function     void FDatasmithDirProducerDetails::CustomizeDetails

Source code excerpt:

		.Padding(0, 3, 3, 0)
		[
			SAssignNew(IconText, STextBlock)
			.Font(FAppStyle::Get().GetFontStyle("FontAwesome.11"))
			.Text(MakeAttributeLambda([this]
			{
				return IsProducerSuperseded() ? FEditorFontGlyphs::Exclamation_Triangle : FEditorFontGlyphs::Folder;
			}))
			.ColorAndOpacity(this, &FDataprepContentProducerDetails::GetStatusColorAndOpacity)

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Private/DatasmithFileProducer.cpp:1838

Scope (from outer to inner):

file
function     void FDatasmithDirProducerDetails::CustomizeDetails

Source code excerpt:

	];

	IconText->SetToolTipText(MakeAttributeLambda([this]
	{
		if (IsProducerSuperseded())
		{
			return LOCTEXT("FDatasmithDirProducerDetails_StatusTextTooltip_Superseded", "This producer is superseded by another one and will be skipped when run.");
		}
		return LOCTEXT("DatasmithDirProducerDetails_ImportDirTooltip", "The folder which to load files from");

#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/LevelEditorToolBar.cpp:74

Scope (from outer to inner):

file
namespace    PreviewModeFunctionality
function     FText GetPreviewModeText

Source code excerpt:

				return GEditor->PreviewPlatform.PreviewPlatformName == TestItem.PlatformName && GEditor->PreviewPlatform.PreviewShaderFormatName == TestItem.ShaderFormat && GEditor->PreviewPlatform.PreviewShaderPlatformName == TestItem.PreviewShaderPlatformName;
			});
		return Item ? Item->IconText : FText();
	}

	FText GetPreviewModeTooltip()
	{
#define LOCTEXT_NAMESPACE "LevelEditorToolBar"
		EShaderPlatform PreviewShaderPlatform = GEditor->PreviewPlatform.PreviewShaderPlatformName != NAME_None ?

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimTimelineTrack_Montage.cpp:79

Scope (from outer to inner):

file
class        class SMontageSections : public SLeafWidget
function     FText GetSectionIconText

Source code excerpt:

		int32 NextSectionIndex = GetNextSectionIndex(AnimMontage, InSectionIndex);

		FText IconText;
		if(NextSectionIndex == INDEX_NONE)
		{
			IconText = FText::GetEmpty();
		}
		else if(NextSectionIndex == InSectionIndex)
		{
			IconText = FEditorFontGlyphs::Undo;
		}
		else if(NextSectionIndex > InSectionIndex)
		{
			IconText = FEditorFontGlyphs::Arrow_Right;
		}
		else if(NextSectionIndex < InSectionIndex)
		{
			IconText = FEditorFontGlyphs::Arrow_Left;
		}

		return IconText;
	}

	int32 GetSectionTiming(int32 InSectionIndex) const
	{
		TArray<TSharedPtr<FTimingRelevantElementBase>> TimingElements;
		SAnimTimingPanel::GetTimingRelevantElements(AnimMontage, TimingElements);

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimTimelineTrack_Montage.cpp:157

Scope (from outer to inner):

file
class        class SMontageSections : public SLeafWidget
function     virtual int32 OnPaint

Source code excerpt:

			const FVector2D TextBorderSize = TextSize + (MontageSectionsConstants::TextBorderMargin * 2.0f);

			const FText IconText = GetSectionIconText(SectionIndex);
			const FVector2D TextIconSize = FontMeasureService->Measure(IconText, LabelFont);
			const FVector2D TextIconBorderSize = TextIconSize + (MontageSectionsConstants::TextBorderMargin * 2.0f);

			const FVector2D TotalBorderSize(TextBorderSize.X + TextIconBorderSize.X, FMath::Max(TextBorderSize.Y, TextIconBorderSize.Y));

			const float LabelPosX = ScaleInfo.InputToLocalX(DraggedSectionIndex == SectionIndex ? DraggedSectionTime : CompositeSection.GetTime());
			const float LabelPosY = static_cast<float>((AllottedGeometry.GetLocalSize().Y * 0.5) - (TextBorderSize.Y * 0.5));

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimTimelineTrack_Montage.cpp:191

Scope (from outer to inner):

file
class        class SMontageSections : public SLeafWidget
function     virtual int32 OnPaint

Source code excerpt:

				++LayerId,
				AllottedGeometry.ToPaintGeometry(TextIconSize, FSlateLayoutTransform(FVector2D(bDrawLabelOnLeft ? (LabelPosX - TotalBorderSize.X) + TextBorderSize.X + (MontageSectionsConstants::TextBorderMargin.X * 2.0f) + MontageSectionsConstants::TextOffset.X : LabelPosX + MontageSectionsConstants::TextOffset.X + (MontageSectionsConstants::TextBorderMargin.X * 2.0f) + TextBorderSize.X, IconPosY + MontageSectionsConstants::TextOffset.Y))),
				IconText,
				IconFont,
				ESlateDrawEffect::None,
				FLinearColor::Black);
		}

		return LayerId;

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimTimelineTrack_Montage.cpp:218

Scope (from outer to inner):

file
class        class SMontageSections : public SLeafWidget
function     bool HitTestSections

Source code excerpt:

			const FVector2D TextBorderSize = TextSize + (MontageSectionsConstants::TextBorderMargin * 2.0f);

			const FText IconText = GetSectionIconText(SectionIndex);
			const FVector2D TextIconSize = FontMeasureService->Measure(IconText, LabelFont);
			const FVector2D TextIconBorderSize = TextIconSize + (MontageSectionsConstants::TextBorderMargin * 2.0f);

			const FVector2D TotalBorderSize(TextBorderSize.X + TextIconBorderSize.X, FMath::Max(TextBorderSize.Y, TextIconBorderSize.Y));

			const double LabelPosX = ScaleInfo.InputToLocalX(CompositeSection.GetTime());
			const double LabelPosY = (MyGeometry.GetLocalSize().Y * 0.5) - (TotalBorderSize.Y * 0.5);

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Misc/DataDrivenPlatformInfoRegistry.cpp:292

Scope (from outer to inner):

file
function     static void ParsePreviewPlatforms

Source code excerpt:

				checkf(Item.ShaderPlatformToPreview != NAME_None, TEXT("DataDrivenPlatformInfo section [PreviewPlatform %s] must specify a ShaderPlatform"), *SectionName);
				FTextStringHelper::ReadFromBuffer(*GetSectionString(Section.Value, FName("MenuTooltip")), Item.MenuTooltip);
				FTextStringHelper::ReadFromBuffer(*GetSectionString(Section.Value, FName("IconText")), Item.IconText);


				FString AllDeviceProfiles = GetSectionString(Section.Value, FName("DeviceProfileName"));
				FString AllFriendlyName = GetSectionString(Section.Value, FName("FriendlyName"));
				TArray<FString> DeviceProfileNames, FriendlyNames;
				AllDeviceProfiles.ParseIntoArray(DeviceProfileNames, TEXT(","));

#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/Misc/DataDrivenPlatformInfoRegistry.h:108

Scope: file

Source code excerpt:

	FText OptionalFriendlyNameOverride;
	FText MenuTooltip;
	FText IconText;
	FName DeviceProfileName;
};

#endif