You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Breaking changes include:
* Rename of GEditorModeTools -> GLevelEditorModeTools to signify that it applies only to the level editor modes
* Addition of FEditorModeRegistry, responsible for managing and creating new editor modes. Modes are no longer registered with an instance of the mode, instead with a mode factory that is able to create a new mode of that type.
* Editor modes now operate on FEditorViewportClients rather than FLevelEditorViewportClients
* Added ability to specify an FEditorModeTools when creating an FEditorViewport
Moved component vizualiser manager handling outside of individual editor modes, and into FLevelEditorViewportClient. This should make it easier to transplant in future.
This work addresses TTP#334640 - EDITOR: Investigate making editor modes a per-'editor' concept
Reviewed by Michael Noland, Matt Kuhlenschmidt
[CL 2109245 by Andrew Rodham in Main branch]
50 lines
1.4 KiB
C++
50 lines
1.4 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "IBspModeModule.h"
|
|
|
|
struct FBspBuilderType
|
|
{
|
|
FBspBuilderType(class UClass* InBuilderClass, const FText& InText, const FText& InToolTipText, const FSlateBrush* InIcon)
|
|
: BuilderClass(InBuilderClass)
|
|
, Text(InText)
|
|
, ToolTipText(InToolTipText)
|
|
, Icon(InIcon)
|
|
{
|
|
}
|
|
|
|
/** The class of the builder brush */
|
|
TWeakObjectPtr<UClass> BuilderClass;
|
|
|
|
/** The name to be displayed for this builder */
|
|
FText Text;
|
|
|
|
/** The name to be displayed for this builder */
|
|
FText ToolTipText;
|
|
|
|
/** The icon to be displayed for this builder */
|
|
const FSlateBrush* Icon;
|
|
};
|
|
|
|
class FBspModeModule : public IBspModeModule
|
|
{
|
|
public:
|
|
|
|
/** IModuleInterface interface */
|
|
virtual void StartupModule() override;
|
|
virtual void ShutdownModule() override;
|
|
|
|
/** IBspModeModule interface */
|
|
virtual TSharedRef< SWidget > CreateBspModeWidget() const override;
|
|
virtual void RegisterBspBuilderType( class UClass* InBuilderClass, const FText& InBuilderName, const FText& InBuilderTooltip, const FSlateBrush* InBuilderIcon ) override;
|
|
virtual void UnregisterBspBuilderType( class UClass* InBuilderClass ) override;
|
|
|
|
const TArray< TSharedPtr<FBspBuilderType> >& GetBspBuilderTypes();
|
|
TSharedPtr<FBspBuilderType> FindBspBuilderType(UClass* InBuilderClass) const;
|
|
|
|
private:
|
|
|
|
TArray< TSharedPtr<FBspBuilderType> > BspBuilderTypes;
|
|
};
|