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]
64 lines
2.1 KiB
C++
64 lines
2.1 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#pragma once
|
|
|
|
/**
|
|
* Tools for the level editor
|
|
*/
|
|
class SLevelEditorToolBox : public SCompoundWidget, public FNotifyHook
|
|
{
|
|
public:
|
|
SLATE_BEGIN_ARGS( SLevelEditorToolBox ){}
|
|
SLATE_END_ARGS()
|
|
|
|
~SLevelEditorToolBox();
|
|
|
|
void Construct( const FArguments& InArgs, const TSharedRef< class ILevelEditor >& OwningLevelEditor );
|
|
|
|
/** Called by SLevelEditor to notify the toolbox about a new toolkit being hosted */
|
|
void OnToolkitHostingStarted( const TSharedRef< class IToolkit >& Toolkit );
|
|
|
|
/** Called by SLevelEditor to notify the toolbox about an existing toolkit no longer being hosted */
|
|
void OnToolkitHostingFinished(const TSharedRef< class IToolkit >& Toolkit);
|
|
|
|
/** Handles updating the mode toolbar when the registered mode commands change */
|
|
void OnEditorModeCommandsChanged();
|
|
|
|
private:
|
|
|
|
/** Gets the visibility for the SBorder showing toolbox editor mode inline content */
|
|
EVisibility GetInlineContentHolderVisibility() const;
|
|
|
|
/** Gets the visibility for the message suggesting the user select a tool */
|
|
EVisibility GetNoToolSelectedTextVisibility() const;
|
|
|
|
/** Updates the widget for showing toolbox editor mode inline content */
|
|
void UpdateInlineContent(TSharedPtr<SWidget> InlineContent) const;
|
|
|
|
/** Creates and sets the mode toolbar */
|
|
void UpdateModeToolBar();
|
|
|
|
/** Handles updating the mode toolbar when the user settings change */
|
|
void HandleUserSettingsChange( FName PropertyName );
|
|
|
|
/** Returns specified Editor modes icon, if that mode is active it adds ".Selected" onto the name */
|
|
FSlateIcon GetEditorModeIcon(TSharedPtr< FUICommandInfo > EditorModeUICommand, FEditorModeID EditorMode);
|
|
|
|
private:
|
|
|
|
/** Level editor that we're associated with */
|
|
TWeakPtr<class ILevelEditor> LevelEditor;
|
|
|
|
/** Toolkit area widget */
|
|
TSharedPtr<class SToolkitDisplay> ToolkitArea;
|
|
|
|
/** Inline content area for editor modes */
|
|
TSharedPtr<SBorder> InlineContentHolder;
|
|
|
|
/** The menu extenders to populate the toolbox*/
|
|
TArray< TSharedPtr<FExtender> > ToolboxExtenders;
|
|
|
|
/** The container holding the mode toolbar */
|
|
TSharedPtr< SBorder > ModeToolBarContainer;
|
|
}; |