Files
UnrealEngineUWP/Engine/Source/Editor/LevelEditor/Private/LevelEditorToolBar.h
aditya ravichandran c841f556ad Fixed an issue causing some options in the Add Content menu in the level editor toolbar to not appear
#rb louise.rasmussen
#preflight 614923a2315f540001397646

[CL 17578342 by aditya ravichandran in ue5-main branch]
2021-09-20 21:31:50 -04:00

94 lines
2.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Widgets/SWidget.h"
#include "Framework/Commands/UICommandList.h"
#include "Editor/LevelEditor/Private/SLevelEditor.h"
class UToolMenu;
/**
* Unreal level editor main toolbar
*/
class FLevelEditorToolBar
{
public:
/**
* Static: Creates a widget for the main tool bar
*
* @return New widget
*/
static TSharedRef< SWidget > MakeLevelEditorToolBar( const TSharedRef<FUICommandList>& InCommandList, const TSharedRef<SLevelEditor> InLevelEditor );
static void RegisterLevelEditorToolBar( const TSharedRef<FUICommandList>& InCommandList, const TSharedRef<SLevelEditor> InLevelEditor );
protected:
/**
* Generates menu content for the build combo button drop down menu
*
* @return Menu content widget
*/
static TSharedRef< SWidget > GenerateBuildMenuContent(TSharedRef<FUICommandList> InCommandList, TWeakPtr<SLevelEditor> InLevelEditor);
/**
* Generates menu content for the quick settings combo button drop down menu
*
* @return Menu content widget
*/
static TSharedRef< SWidget > GenerateQuickSettingsMenu(TSharedRef<FUICommandList> InCommandList, TWeakPtr<SLevelEditor> InLevelEditor);
/**
* Generates menu content for the source control combo button drop down menu
*
* @return Menu content widget
*/
static TSharedRef< SWidget > GenerateSourceControlMenu(TSharedRef<FUICommandList> InCommandList, TWeakPtr<SLevelEditor> InLevelEditor);
/**
* Generates menu content for the compile combo button drop down menu
*
* @return Menu content widget
*/
static TSharedRef< SWidget > GenerateOpenBlueprintMenuContent(TSharedRef<FUICommandList> InCommandList, TWeakPtr<SLevelEditor> InLevelEditor);
/**
* Generates menu content for the Cinematics combo button drop down menu
*
* @return Menu content widget
*/
static TSharedRef< SWidget > GenerateCinematicsMenuContent(TSharedRef<FUICommandList> InCommandList, TWeakPtr<SLevelEditor> InLevelEditor);
static TSharedRef< SWidget > GenerateAddMenuWidget(TSharedRef<FUICommandList> InCommandList, TWeakPtr<SLevelEditor> InLevelEditor);
/**
* Delegate for actor selection within the Cinematics popup menu's SceneOutliner.
* Opens the editor for the selected actor and dismisses all popup menus.
*/
static void OnCinematicsActorPicked( AActor* Actor );
/**
* Callback to open a sub-level script Blueprint
*
* @param InLevel The level to open the Blueprint of (creates if needed)
*/
static void OnOpenSubLevelBlueprint( ULevel* InLevel );
private:
static void RegisterSourceControlMenu();
static void RegisterCinematicsMenu();
static void RegisterQuickSettingsMenu();
static void RegisterOpenBlueprintMenu();
static void RegisterAddMenu();
static FText GetActiveModeName(TWeakPtr<SLevelEditor> LevelEditorPtr);
static const FSlateBrush* GetActiveModeIcon(TWeakPtr<SLevelEditor> LevelEditorPtr);
};