You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904 #ROBOMERGE-BOT: (v613-10869866) [CL 10870586 by ryan durand in Main branch]
56 lines
1.6 KiB
C++
56 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/Map.h"
|
|
#include "UObject/NameTypes.h"
|
|
#include "Templates/SharedPointer.h"
|
|
#include "Framework/Commands/UICommandInfo.h"
|
|
#include "Framework/MultiBox/MultiBoxBuilder.h"
|
|
#include "Framework/Commands/Commands.h"
|
|
|
|
class FEditorViewportClient;
|
|
|
|
class COMMONMENUEXTENSIONS_API FBufferVisualizationMenuCommands : public TCommands<FBufferVisualizationMenuCommands>
|
|
{
|
|
public:
|
|
struct FBufferVisualizationRecord
|
|
{
|
|
FName Name;
|
|
TSharedPtr<FUICommandInfo> Command;
|
|
|
|
FBufferVisualizationRecord()
|
|
: Name(),
|
|
Command()
|
|
{
|
|
}
|
|
};
|
|
|
|
typedef TMultiMap<FName, FBufferVisualizationRecord> TBufferVisualizationModeCommandMap;
|
|
typedef TBufferVisualizationModeCommandMap::TConstIterator TCommandConstIterator;
|
|
|
|
FBufferVisualizationMenuCommands();
|
|
|
|
TCommandConstIterator CreateCommandConstIterator() const;
|
|
const FBufferVisualizationRecord& OverviewCommand() const;
|
|
|
|
static void BuildVisualisationSubMenu(FMenuBuilder& Menu);
|
|
|
|
virtual void RegisterCommands() override;
|
|
|
|
void BindCommands(FUICommandList& CommandList, const TSharedPtr<FEditorViewportClient>& Client) const;
|
|
|
|
private:
|
|
void BuildCommandMap();
|
|
|
|
void CreateOverviewCommand();
|
|
void CreateVisualizationCommands();
|
|
|
|
void AddOverviewCommandToMenu(FMenuBuilder& Menu) const;
|
|
void AddVisualizationCommandsToMenu(FMenuBuilder& menu) const;
|
|
|
|
static void ChangeBufferVisualizationMode(const TSharedPtr<FEditorViewportClient>& Client, FName InName);
|
|
static bool IsBufferVisualizationModeSelected(const TSharedPtr<FEditorViewportClient>& Client, FName InName);
|
|
|
|
TBufferVisualizationModeCommandMap CommandMap;
|
|
}; |