Files
UnrealEngineUWP/Engine/Source/Editor/ConfigEditor/Private/ConfigEditorModule.h
Terence Burns 14cb541a13 Config Editor added to UE4.
We now have the capacity to set a uproperty value anywhere in the config file hierarchy

Satisfies UEPLAT-429

The user can now use the 'ConfigHierarchyEditable' meta flag in their uproperties to present a butoon that allows the property to be edited in the config hierarchy, where applicable.
Target platform is configurable.

[CL 2521330 by Terence Burns in Main branch]
2015-04-22 13:40:06 -04:00

51 lines
1.7 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
// Module includes
#include "IConfigEditorModule.h"
#include "SConfigEditor.h"
/*-----------------------------------------------------------------------------
FConfigEditorModule
-----------------------------------------------------------------------------*/
class FConfigEditorModule : public IConfigEditorModule
{
public:
// Begin IModuleInterface interface
virtual void StartupModule() override;
virtual void ShutdownModule() override;
// End IModuleInterface interface
public:
// Begin IConfigEditorModule interface
virtual void CreateHierarchyEditor(UProperty* EditProperty) override;
virtual void AddExternalPropertyValueWidgetAndConfigPairing(const FString& ConfigFile, const TSharedPtr<SWidget> ValueWidget) override;
virtual TSharedRef<SWidget> GetValueWidgetForConfigProperty(const FString& ConfigFile) override;
// End IConfigEditorModule interface
private:
/**
* Creates a new Config editor tab
*
* @return A spawned tab containing a config editor for a pre-defined property
*/
TSharedRef<class SDockTab> SpawnConfigEditorTab(const FSpawnTabArgs& Args);
private:
// We use this to maintain a reference to a property value widget, ie. a combobox for enum, a check box for bool...
// and provide these references when they are needed later in the details view construction
// This is important.
TMap<FString, TSharedPtr<SWidget>> ExternalPropertyValueWidgetAndConfigPairings;
// Reference to the Config editor widget
TSharedPtr<SConfigEditor> PropertyConfigEditor;
// Reference to the property the hierarchy is to view.
TWeakObjectPtr<UProperty> CachedPropertyToView;
};