MenuTooltip

MenuTooltip

#Overview

name: MenuTooltip

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

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of MenuTooltip is to provide descriptive text for menu items or UI elements in various parts of the Unreal Engine editor and runtime systems. It is used to give users additional information about a specific menu option or feature when they hover over or interact with it.

This setting variable is primarily used in the following Unreal Engine subsystems and modules:

  1. Property Animator Editor Plugin
  2. Level Editor
  3. Core Engine Module (specifically in the Data-Driven Platform Info Registry)

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

  1. In the Property Animator Editor, it’s set using the LOCTEXT macro for localization.
  2. In the Level Editor, it’s likely set when registering commands for the UI.
  3. In the Data-Driven Platform Info Registry, it’s read from a configuration file using FTextStringHelper::ReadFromBuffer.

MenuTooltip often interacts with other variables related to UI elements, such as MenuTitle, FriendlyName, and IconText. These variables work together to create a cohesive and informative user interface.

Developers should be aware of the following when using this variable:

  1. Localization: Ensure that the MenuTooltip text is properly localized using the LOCTEXT macro or other localization methods.
  2. Consistency: Maintain a consistent style and level of detail across all tooltips in the application.
  3. Context: The tooltip should provide relevant and helpful information specific to the menu item or feature it describes.

Best practices for using MenuTooltip include:

  1. Keep the tooltip text concise but informative.
  2. Use clear and simple language to explain the purpose or function of the menu item.
  3. Avoid repeating the exact text of the menu item label in the tooltip.
  4. Consider adding keyboard shortcuts or additional usage hints in the tooltip when applicable.
  5. Regularly review and update tooltips to ensure they remain accurate and helpful as features evolve.

By following these guidelines, developers can effectively use MenuTooltip to enhance the user experience and provide valuable information to users interacting with the Unreal Engine editor and related tools.

#Setting Variables

#References In INI files

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

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

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

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

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

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:142, section: [PreviewPlatform METAL_SM5]

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:148, section: [PreviewPlatform METAL_SM6]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:284, section: [PreviewPlatform VULKAN_SM5]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:82, section: [PreviewPlatform PCD3D_SM5]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:144, section: [PreviewPlatform PCD3D_SM6]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:169, section: [PreviewPlatform PCD3D_ES3_1]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Experimental/PropertyAnimator/Source/PropertyAnimatorEditor/Private/Sequencer/PropertyAnimatorEditorCurveSectionMenuExtension.cpp:50

Scope (from outer to inner):

file
function     void FPropertyAnimatorEditorCurveSectionMenuExtension::ExtendMenu

Source code excerpt:


	FText MenuTitle   = LOCTEXT("ChannelsMenuLabel", "Curve Channels");
	FText MenuTooltip = LOCTEXT("ChannelsMenuTooltip", "Edit parameters for curve channels");

	if (ChannelHandles.Num() > 1)
	{
		InMenuBuilder.AddSubMenu(MenuTitle, MenuTooltip, FNewMenuDelegate::CreateLambda([This](FMenuBuilder& InInnerMenuBuilder)
			{
				This->BuildChannelsMenu(InInnerMenuBuilder);
			}));
	}
	else if (ChannelHandles.Num() == 1)
	{
		InMenuBuilder.AddSubMenu(MenuTitle, MenuTooltip, FNewMenuDelegate::CreateLambda([This](FMenuBuilder& InInnerMenuBuilder)
			{
				This->BuildParametersMenu(InInnerMenuBuilder, 0);
			}));
	}
}

#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/LevelEditorActions.cpp:3977

Scope (from outer to inner):

file
function     UE_DISABLE_OPTIMIZATION_SHIP void FLevelEditorCommands::RegisterCommands

Source code excerpt:

				FName(*FString::Printf(TEXT("PreviewPlatformOverrides_%s_%s_%s"), *Item.PlatformName.ToString(), *Item.ShaderFormat.ToString(), *Item.DeviceProfileName.ToString())),
				FriendlyNameBuilder.ToText(),
				Item.MenuTooltip)
			.UserInterfaceType(EUserInterfaceActionType::Check)
			.DefaultChord(FInputChord())
		);
	}

	UI_COMMAND(OpenMergeActor, "Merge Actors", "Opens the Merge Actor panel", EUserInterfaceActionType::Button, FInputChord());

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

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;

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

Scope: file

Source code excerpt:

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

#endif