RulerBackgroundColor
RulerBackgroundColor
#Overview
name: RulerBackgroundColor
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 RulerBackgroundColor is to define the background color for the ruler in the Waveform Editor within Unreal Engine 5. This setting variable is specifically used for customizing the visual appearance of the time ruler in the waveform editing interface.
The Unreal Engine subsystem that relies on this setting variable is the Waveform Editor, which is part of the WaveformEditorWidgets plugin. This plugin is likely used for audio-related editing tasks within the Unreal Engine editor.
The value of this variable is set in the UWaveformEditorWidgetsSettings class constructor, where it is initialized to FLinearColor::Black. It can be modified through the engine’s configuration system, as indicated by the ‘config’ specifier in the UPROPERTY macro.
Other variables that interact with RulerBackgroundColor include:
- RulerTicksColor: for the color of the ruler ticks
- RulerTextColor: for the color of the text on the ruler
- RulerFontSize: for the size of the text on the ruler
Developers should be aware that changing this variable will affect the visual appearance of the waveform editor’s time ruler. It’s important to choose a color that provides good contrast with the ruler ticks and text for readability.
Best practices when using this variable include:
- Ensure the chosen color provides sufficient contrast with RulerTicksColor and RulerTextColor.
- Consider the overall color scheme of the waveform editor when selecting a background color.
- Test the chosen color in different lighting conditions to ensure it remains visible and doesn’t strain the user’s eyes.
- Use the engine’s configuration system to allow easy customization without recompiling the code.
- Consider providing presets or a color picker in the user interface for easy adjustment by end-users.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Config/BaseWaveformEditor.ini:7, section: [/Script/WaveformEditorWidgets.WaveformEditorWidgetsSettings]
- INI Section:
/Script/WaveformEditorWidgets.WaveformEditorWidgetsSettings
- Raw value:
(R=0.000000,G=0.000000,B=0.000000,A=1.000000)
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorStyle.cpp:112
Scope: file
Source code excerpt:
CreateTimeRulerStyleFromSettings(*Settings);
}
else if (PropertyName == GET_MEMBER_NAME_CHECKED(UWaveformEditorWidgetsSettings, RulerBackgroundColor))
{
CreateTimeRulerStyleFromSettings(*Settings);
}
else if (PropertyName == GET_MEMBER_NAME_CHECKED(UWaveformEditorWidgetsSettings, RulerTicksColor))
{
CreateTimeRulerStyleFromSettings(*Settings);
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorStyle.cpp:182
Scope (from outer to inner):
file
function FFixedSampleSequenceRulerStyle FWaveformEditorStyle::CreateTimeRulerStyleFromSettings
Source code excerpt:
.SetHandleColor(InSettings.PlayheadColor)
.SetFontSize(InSettings.RulerFontSize)
.SetBackgroundColor(InSettings.RulerBackgroundColor);
const ISlateStyle* AudioWidgetsStyle = FSlateStyleRegistry::FindSlateStyle("AudioWidgetsStyle");
if (ensure(AudioWidgetsStyle))
{
TimeRulerStyle.SetHandleBrush(*AudioWidgetsStyle->GetBrush("SampledSequenceRuler.VanillaScrubHandleDown"));
}
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorWidgetsSettings.cpp:12
Scope (from outer to inner):
file
function UWaveformEditorWidgetsSettings::UWaveformEditorWidgetsSettings
Source code excerpt:
, MajorGridColor(FLinearColor::Black)
, MinorGridColor(FLinearColor(0.f, 0.f, 0.f, 0.5f))
, RulerBackgroundColor(FLinearColor::Black)
, RulerTicksColor(FLinearColor(1.f, 1.f, 1.f, 0.9f))
, RulerTextColor(FLinearColor(1.f, 1.f, 1.f, 0.9f))
, RulerFontSize(10.f)
, ShowLoudnessGrid(true)
, ShowLoudnessGridDecibelValues(true)
, MaxLoudnessGridDivisions(3)
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorWidgetsSettings.h:57
Scope (from outer to inner):
file
class class UWaveformEditorWidgetsSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = "Ruler")
FLinearColor RulerBackgroundColor;
UPROPERTY(config, EditAnywhere, Category = "Ruler")
FLinearColor RulerTicksColor;
UPROPERTY(config, EditAnywhere, Category = "Ruler")
FLinearColor RulerTextColor;