Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/KeyStructCustomization.h
Ryan Vance 7c51ff94af Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR)
CL 1 of 8
#rb integration

[CL 4748712 by Ryan Vance in Dev-VR branch]
2019-01-17 18:54:05 -05:00

43 lines
1.2 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "InputCoreTypes.h"
#include "IPropertyTypeCustomization.h"
#include "PropertyHandle.h"
/**
* Implements a details panel customization for FKey structures.
*/
class FKeyStructCustomization
: public IPropertyTypeCustomization
{
public:
// IPropertyTypeCustomization interface
virtual void CustomizeHeader(TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
virtual void CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override { };
public:
/**
* Creates a new instance.
*
* @return A new struct customization for Keys.
*/
static TSharedRef<IPropertyTypeCustomization> MakeInstance( );
private:
/** Gets the current Key being edited. */
TOptional<FKey> GetCurrentKey() const;
/** Updates the property when a new key is selected. */
void OnKeyChanged(TSharedPtr<FKey> SelectedKey);
/** Holds a handle to the property being edited. */
TSharedPtr<IPropertyHandle> PropertyHandle;
};