AutoCompleteFadedColor
AutoCompleteFadedColor
#Overview
name: AutoCompleteFadedColor
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 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AutoCompleteFadedColor is to define the color used for displaying certain elements in the Unreal Engine console’s autocomplete feature. Specifically, it is used for command descriptions and read-only Console Variables (CVars).
This setting variable is primarily used by the Unreal Engine’s console subsystem, which is part of the Engine module. It’s utilized in the console’s user interface rendering and autocomplete functionality.
The value of this variable is set in the ConsoleSettings class, which is defined in the EngineSettings module. It’s declared as a config property, meaning it can be configured through project settings or ini files.
AutoCompleteFadedColor interacts with other console-related variables, such as AutoCompleteCVarColor. While AutoCompleteFadedColor is used for read-only CVars and command descriptions, AutoCompleteCVarColor is used for writable CVars.
Developers should be aware that this color is used to visually distinguish between different types of autocomplete suggestions in the console. The faded color typically indicates elements that are informational or not directly editable.
Best practices when using this variable include:
- Ensuring sufficient contrast with other console colors for readability.
- Considering color-blind accessibility when choosing the color.
- Maintaining consistency with the overall UI color scheme of the project.
- Using it in conjunction with other console color settings to create a cohesive visual hierarchy in the console interface.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseInput.ini:255, section: [/Script/EngineSettings.ConsoleSettings]
- INI Section:
/Script/EngineSettings.ConsoleSettings
- Raw value:
(R=100,G=100,B=100,A=255)
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UserInterface/Console.cpp:118
Scope (from outer to inner):
file
class class FConsoleVariableAutoCompleteVisitor
function static void OnConsoleVariable
Source code excerpt:
if (CVar->TestFlags(ECVF_ReadOnly))
{
Cmd.Color = ConsoleSettings->AutoCompleteFadedColor;
}
else
{
Cmd.Color = ConsoleSettings->AutoCompleteCVarColor;
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UserInterface/Console.cpp:1526
Scope (from outer to inner):
file
function void UConsole::PostRender_InputLine
Source code excerpt:
if (!PrecompletedInputText.IsEmpty())
{
ConsoleText.SetColor(ConsoleSettings->AutoCompleteFadedColor);
ConsoleText.Text = FText::FromString(PrecompletedInputText);
Canvas->DrawItem(ConsoleText, UserInputLinePos.X + xl, UserInputLinePos.Y - 3 - yl);
}
// Draw the autocomplete elements
if (AutoComplete.Num() > 0)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UserInterface/Console.cpp:1586
Scope (from outer to inner):
file
function void UConsole::PostRender_InputLine
Source code excerpt:
MoreMatchesLine.Command = FString::Printf(TEXT("[%i more matches]"), (AutoComplete.Num() - MAX_AUTOCOMPLETION_LINES));
MoreMatchesLine.Color = ConsoleSettings->AutoCompleteFadedColor;
AutoCompleteElements.Add(&MoreMatchesLine);
}
// background rectangle behind auto completion
float MaxWidth = (MaxLeftWidth + MaxRightWidth);
float Height = AutoCompleteElements.Num() * yl;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UserInterface/Console.cpp:1619
Scope (from outer to inner):
file
function void UConsole::PostRender_InputLine
lambda-function
Source code excerpt:
FColor LeftC = AutoCompleteElement.Color;
FColor RightC = ConsoleSettings->AutoCompleteFadedColor;
if (bCursorLineColor)
{
ConsoleTile.Size = FVector2D(MaxWidth, yl);
ConsoleTile.SetColor(ConsoleDefs::CursorLineColor);
ConsoleTile.BlendMode = SE_BLEND_Opaque;
#Loc: <Workspace>/Engine/Source/Runtime/EngineSettings/Classes/ConsoleSettings.h:104
Scope (from outer to inner):
file
class class UConsoleSettings : public UObject
Source code excerpt:
/** The autocomplete color used for command descriptions and read-only CVars. */
UPROPERTY(config, EditAnywhere, Category=Colors)
FColor AutoCompleteFadedColor;
/** Returns an array with the auto-complete command names that match all the words in the substring. */
ENGINESETTINGS_API TArray<FString> GetFilteredManualAutoCompleteCommands(FStringView Substring) const;
};