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:
- The Source Filtering Editor plugin
- The Dataprep Editor plugin
- The Datasmith Importer plugin
- The Level Editor
- The Persona animation editor
- The Core module’s Data-Driven Platform Info system
The value of IconText is typically set in different ways depending on the context:
- In some cases, it’s set directly in the code, such as in the FilterDragDropOperation class.
- In UI customization code, it’s often set using lambda functions that determine the appropriate icon based on certain conditions.
- For the Data-Driven Platform Info system, it’s read from configuration files.
IconText often interacts with other variables and systems:
- It’s frequently used alongside other text variables like tooltips and labels.
- It’s often part of a larger UI structure, such as in custom detail views or timeline tracks.
- 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:
- The text often represents Unicode characters for icons, so proper font support is crucial.
- The value of IconText may change dynamically based on the state of the application or the element it represents.
- It’s important to provide meaningful icons that enhance the user experience and convey information effectively.
Best practices for using IconText include:
- Use consistent icon representations across the application for similar actions or states.
- Provide tooltips or additional context when using icons to ensure clarity.
- Consider accessibility and ensure that important information is not conveyed solely through icons.
- Use appropriate sizing and styling to ensure icons are clearly visible and distinguishable.
- 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]
- INI Section:
PreviewPlatform AndroidES31
- Raw value:
NSLOCTEXT("PreviewPlatform", "PreviewIconText_AndroidOpenGL", "Android OpenGL")
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:42, section: [PreviewPlatform AndroidVulkan]
- INI Section:
PreviewPlatform AndroidVulkan
- Raw value:
NSLOCTEXT("PreviewPlatform", "PreviewIconText_AndroidVulkan", "Android Vulkan")
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:53, section: [PreviewPlatform AndroidVulkanSM5]
- INI Section:
PreviewPlatform AndroidVulkanSM5
- Raw value:
NSLOCTEXT("PreviewPlatform", "PreviewIconText_AndroidVulkanSM5", "Android VK SM5")
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:34, section: [PreviewPlatform IOSMetal]
- INI Section:
PreviewPlatform IOSMetal
- Raw value:
NSLOCTEXT("PreviewPlatform", "PreviewIconText_iOS", "iOS")
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:46, section: [PreviewPlatform IOSMetalSM5]
- INI Section:
PreviewPlatform IOSMetalSM5
- Raw value:
NSLOCTEXT("PreviewPlatform", "PreviewIconText_iOSSM5", "iOS SM5")
- Is Array:
False
#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