Window menu refactor & polish

- Window menu is now sectioned and labeled based on the current editor. There's now a local workspace root member in FTabManager and a workspace category in FAssetEditorToolkit (both are FWorkspaceItem objects). Individual editors attach their local category to the tab manager's local root. Workflow app modes have their own category members that are swapped out when the mode changes.

- Finally, the AssetEditorCategory of FWorkspaceMenuStructure has been removed entirely.

- Replaced the AddMenuSeparator() call in FTabManager::PopulateSpawnerMenu_Helper() with a section of the same title as the workspace category.

- Tab spawner menu entries for the local editor now properly show the icon of the associated tab. To accomplish this it was necessary to change FWorkflowTabFactory::TabIcon to be an FSlateIcon instead of an FSlateBrush*. All factory instances have been updated accordingly.

- Added & updated lots of icons! (those missing will be TTP'd)

- The nomad tab spawner section (named "General" in the menu) has been largely compressed into the Developer Tools submenu, which has also been organized into sections for readability.

- Unreal frontend options were also moved into a context menu within the General section

- Moved all experimental tools to their own section of the Window menu. When they're no longer experimental they should register as nomads in the appropriate category

- Undo history now under Edit menu

[CL 2324285 by Dan Hertzka in Main branch]
This commit is contained in:
Dan Hertzka
2014-10-09 12:34:55 -04:00
committed by UnrealBot
parent 944cb2d04e
commit f3092790eb
100 changed files with 972 additions and 659 deletions

View File

@@ -21,11 +21,6 @@ public:
return MenuRoot.ToSharedRef();
}
virtual TSharedRef<FWorkspaceItem> GetAssetEditorCategory() const override
{
return AssetEditorCategory.ToSharedRef();
}
virtual TSharedRef<FWorkspaceItem> GetLevelEditorCategory() const override
{
return LevelEditorCategory.ToSharedRef();
@@ -51,9 +46,19 @@ public:
return ToolsCategory.ToSharedRef();
}
virtual TSharedRef<FWorkspaceItem> GetDeveloperToolsCategory() const override
virtual TSharedRef<FWorkspaceItem> GetDeveloperToolsDebugCategory() const override
{
return DeveloperToolsCategory.ToSharedRef();
return DeveloperToolsDebugCategory.ToSharedRef();
}
virtual TSharedRef<FWorkspaceItem> GetDeveloperToolsLogCategory() const override
{
return DeveloperToolsLogCategory.ToSharedRef();
}
virtual TSharedRef<FWorkspaceItem> GetDeveloperToolsMiscCategory() const override
{
return DeveloperToolsMiscCategory.ToSharedRef();
}
virtual TSharedRef<FWorkspaceItem> GetEditOptions() const override
@@ -61,11 +66,6 @@ public:
return EditOptions.ToSharedRef();
}
void ResetAssetEditorCategory()
{
AssetEditorCategory->ClearItems();
}
void ResetLevelEditorCategory()
{
LevelEditorCategory->ClearItems();
@@ -77,18 +77,23 @@ public:
void ResetToolsCategory()
{
ToolsCategory->ClearItems();
DeveloperToolsCategory = ToolsCategory->AddGroup(LOCTEXT( "WorkspaceMenu_DeveloperToolsCategory", "Developer Tools" ), FSlateIcon(FEditorStyle::GetStyleSetName(), "DeveloperTools.MenuIcon"), true);
// Developer tools sub menu
DeveloperToolsCategory = ToolsCategory->AddGroup(LOCTEXT("WorkspaceMenu_DeveloperToolsCategory", "Developer Tools"), FSlateIcon(FEditorStyle::GetStyleSetName(), "DeveloperTools.MenuIcon"));
// Developer tools sections
DeveloperToolsDebugCategory = DeveloperToolsCategory->AddGroup(LOCTEXT("WorkspaceMenu_DeveloperToolsDebugCategory", "Debug"), FSlateIcon(), true);
DeveloperToolsLogCategory = DeveloperToolsCategory->AddGroup(LOCTEXT("WorkspaceMenu_DeveloperToolsLogCategory", "Log"), FSlateIcon(), true);
DeveloperToolsMiscCategory = DeveloperToolsCategory->AddGroup(LOCTEXT("WorkspaceMenu_DeveloperToolsMiscCategory", "Miscellaneous"), FSlateIcon(), true);
}
public:
FWorkspaceMenuStructure()
: MenuRoot ( FWorkspaceItem::NewGroup(LOCTEXT( "WorkspaceMenu_Root", "Menu Root" )) )
, AssetEditorCategory ( MenuRoot->AddGroup(LOCTEXT( "WorkspaceMenu_AssetEditorCategory", "Asset Editor Tabs" )) )
, LevelEditorCategory ( MenuRoot->AddGroup(LOCTEXT( "WorkspaceMenu_LevelEditorCategory", "Level Editor Tabs" ), FSlateIcon(), true) )
, ToolsCategory ( MenuRoot->AddGroup(LOCTEXT( "WorkspaceMenu_ToolsCategory", "Application Windows" ), FSlateIcon(), true) )
, EditOptions ( FWorkspaceItem::NewGroup(LOCTEXT( "WorkspaceEdit_Options", "Edit Options" )) )
, LevelEditorCategory ( MenuRoot->AddGroup(LOCTEXT( "WorkspaceMenu_LevelEditorCategory", "Level Editor" ), FSlateIcon(), true) )
, ToolsCategory ( MenuRoot->AddGroup(LOCTEXT( "WorkspaceMenu_ToolsCategory", "General" ), FSlateIcon(), true) )
, EditOptions( FWorkspaceItem::NewGroup(LOCTEXT( "WorkspaceEdit_Options", "Edit Options" )) )
{
ResetAssetEditorCategory();
ResetLevelEditorCategory();
ResetToolsCategory();
}
@@ -97,13 +102,18 @@ public:
private:
TSharedPtr<FWorkspaceItem> MenuRoot;
TSharedPtr<FWorkspaceItem> AssetEditorCategory;
TSharedPtr<FWorkspaceItem> LevelEditorCategory;
TSharedPtr<FWorkspaceItem> LevelEditorViewportsCategory;
TSharedPtr<FWorkspaceItem> LevelEditorDetailsCategory;
TSharedPtr<FWorkspaceItem> LevelEditorModesCategory;
TSharedPtr<FWorkspaceItem> ToolsCategory;
TSharedPtr<FWorkspaceItem> DeveloperToolsCategory;
TSharedPtr<FWorkspaceItem> DeveloperToolsDebugCategory;
TSharedPtr<FWorkspaceItem> DeveloperToolsLogCategory;
TSharedPtr<FWorkspaceItem> DeveloperToolsMiscCategory;
TSharedPtr<FWorkspaceItem> EditOptions;
};
@@ -123,12 +133,6 @@ const IWorkspaceMenuStructure& FWorkspaceMenuStructureModule::GetWorkspaceMenuSt
return *WorkspaceMenuStructure;
}
void FWorkspaceMenuStructureModule::ResetAssetEditorCategory()
{
check(WorkspaceMenuStructure.IsValid());
WorkspaceMenuStructure->ResetAssetEditorCategory();
}
void FWorkspaceMenuStructureModule::ResetLevelEditorCategory()
{
check(WorkspaceMenuStructure.IsValid());