SelectedLabelColor

SelectedLabelColor

#Overview

name: SelectedLabelColor

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

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of SelectedLabelColor is to define the color used for highlighting selected labels in the Unreal Engine 5 curve editor interface. This variable is part of the visual customization options for the curve editor, which is a tool used for editing various types of curves and distributions in the engine.

The SelectedLabelColor variable is primarily used by the Distribution Curve Editor module, specifically within the FCurveEditorViewportClient class. This class is responsible for rendering the viewport of the curve editor.

The value of this variable is set through the UCurveEdOptions class, which is a configuration object for the curve editor. It’s defined as an UPROPERTY with the EditAnywhere and config specifiers, meaning it can be edited in the editor and saved to configuration files.

SelectedLabelColor interacts with several other color variables used in the curve editor interface, such as BackgroundColor, LabelColor, GridColor, GridTextColor, LabelBlockBkgColor, and SelectedKeyColor. These variables work together to define the overall visual appearance of the curve editor.

Developers should be aware that changing this color can affect the visibility and readability of selected labels in the curve editor. It’s important to choose a color that contrasts well with the background and other elements to ensure good usability.

Best practices when using this variable include:

  1. Choosing a color that provides clear visual distinction for selected labels.
  2. Ensuring the selected color doesn’t clash with other interface elements.
  3. Considering accessibility for users with color vision deficiencies.
  4. Testing the chosen color in different lighting conditions and on various monitor types to ensure consistent visibility.
  5. Using this variable in conjunction with other color variables to create a cohesive and visually pleasing interface.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:532, section: [/Script/UnrealEd.CurveEdOptions]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/DistCurveEditor/Private/CurveEditorViewportClient.cpp:80

Scope (from outer to inner):

file
function     FCurveEditorViewportClient::FCurveEditorViewportClient

Source code excerpt:

	BackgroundColor = SharedData->EditorOptions->BackgroundColor;
	LabelColor = SharedData->EditorOptions->LabelColor;
	SelectedLabelColor = SharedData->EditorOptions->SelectedLabelColor;
	GridColor = SharedData->EditorOptions->GridColor;
	GridTextColor = SharedData->EditorOptions->GridTextColor;
	LabelBlockBkgColor = SharedData->EditorOptions->LabelBlockBkgColor;
	SelectedKeyColor = SharedData->EditorOptions->SelectedKeyColor;

	MouseOverCurveIndex = INDEX_NONE;

#Loc: <Workspace>/Engine/Source/Editor/DistCurveEditor/Private/CurveEditorViewportClient.cpp:189

Scope (from outer to inner):

file
function     void FCurveEditorViewportClient::Draw

Source code excerpt:

			if (CURVEEDENTRY_SELECTED(Entry.bHideCurve))
			{
				Canvas->DrawTile(0, CurrentKeyY, LabelWidth, SharedData->LabelEntryHeight, 0.f, 0.f, 1.f, 1.f, SelectedLabelColor);
			}
			else
			{
				Canvas->DrawTile( 0, CurrentKeyY, LabelWidth, SharedData->LabelEntryHeight, 0.f, 0.f, 1.f, 1.f, LabelColor);
			}
			Canvas->DrawTile( 0, CurrentKeyY, ColorKeyWidth, SharedData->LabelEntryHeight, 0.f, 0.f, 1.f, 1.f, Entry.CurveColor);

#Loc: <Workspace>/Engine/Source/Editor/DistCurveEditor/Private/CurveEditorViewportClient.h:151

Scope (from outer to inner):

file
class        class FCurveEditorViewportClient : public FCommonViewportClient

Source code excerpt:

	FLinearColor BackgroundColor;
	FLinearColor LabelColor;
	FLinearColor SelectedLabelColor;
	FLinearColor GridColor;
	FLinearColor GridTextColor;
	FLinearColor LabelBlockBkgColor;
	FLinearColor SelectedKeyColor;

	int32 MouseOverCurveIndex;

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/CurveEdOptions.h:32

Scope (from outer to inner):

file
class        class UCurveEdOptions : public UObject

Source code excerpt:


	UPROPERTY(EditAnywhere, config, Category=Options)
	FLinearColor SelectedLabelColor;

	UPROPERTY(EditAnywhere, config, Category=Options)
	FLinearColor GridColor;

	UPROPERTY(EditAnywhere, config, Category=Options)
	FLinearColor GridTextColor;