Files
UnrealEngineUWP/Engine/Source/Editor/TextureEditor/Private/Customizations/TextureDetailsCustomization.h
ben marsh 2b46ba7b94 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4662404 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4662413 by ben marsh in Dev-Networking branch]
2018-12-14 13:44:01 -05:00

48 lines
1.5 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "SlateFwd.h"
#include "UObject/WeakObjectPtr.h"
#include "Types/SlateEnums.h"
#include "IDetailCustomization.h"
class IDetailLayoutBuilder;
class IPropertyHandle;
class FTextureDetails : public IDetailCustomization
{
public:
/** Makes a new instance of this detail layout class for a specific detail view requesting it */
static TSharedRef<IDetailCustomization> MakeInstance();
protected:
FTextureDetails()
: bIsUsingSlider(false)
{}
private:
/** IDetailCustomization interface */
virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
TOptional<int32> OnGetMaxTextureSize() const;
void OnMaxTextureSizeChanged(int32 NewValue);
void OnMaxTextureSizeCommitted(int32 NewValue, ETextCommit::Type CommitInfo);
void OnBeginSliderMovement();
void OnEndSliderMovement(int32 NewValue);
bool CanEditMaxTextureSize() const;
void CreateMaxTextureSizeMessage() const;
void OnPowerOfTwoModeChanged(TSharedPtr<FString> NewValue, ESelectInfo::Type SelectInfo);
bool CanEditPowerOfTwoMode(int32 NewPowerOfTwoMode) const;
void CreatePowerOfTwoModeMessage() const;
void OnPropertyResetToDefault() const;
TSharedPtr<IPropertyHandle> MaxTextureSizePropertyHandle;
TSharedPtr<IPropertyHandle> PowerOfTwoModePropertyHandle;
TArray<TSharedPtr<FString>> PowerOfTwoModeComboBoxList;
TWeakObjectPtr<UObject> TextureBeingCustomized;
TSharedPtr<STextComboBox> TextComboBox;
bool bIsUsingSlider;
};