Files
UnrealEngineUWP/Engine/Source/Developer/MaterialBaking/Private/MaterialOptionsWindow.h
Marcus Wassmer cbfcbbb93b Merging //UE4/Dev-Main@4662404 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
Should be just copyright updates

[CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
2019-01-03 19:16:26 -05:00

59 lines
2.0 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Widgets/SCompoundWidget.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SWindow.h"
#include "IDetailRootObjectCustomization.h"
struct FMaterialData;
class SButton;
/** Required to ensure desired details view layout */
class FSimpleRootObjectCustomization : public IDetailRootObjectCustomization
{
public:
/** IDetailRootObjectCustomization interface */
virtual TSharedPtr<SWidget> CustomizeObjectHeader(const UObject* InRootObject) override;
virtual bool IsObjectVisible(const UObject* InRootObject) const override { return true; }
virtual bool ShouldDisplayHeader(const UObject* InRootObject) const override { return false; }
};
/** Options window used to populate provided settings objects */
class SMaterialOptions : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SMaterialOptions)
: _WidgetWindow(), _NumLODs(1)
{}
SLATE_ARGUMENT(TSharedPtr<SWindow>, WidgetWindow)
SLATE_ARGUMENT(int32, NumLODs)
SLATE_ARGUMENT(TArray<TWeakObjectPtr<UObject>>, SettingsObjects)
SLATE_END_ARGS()
public:
SMaterialOptions();
void Construct(const FArguments& InArgs);
/** Begin SCompoundWidget overrides */
virtual bool SupportsKeyboardFocus() const override { return true; }
virtual FReply OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent) override;
/** End SCompoundWidget overrides */
/** Callbacks used for Confirm and Cancel buttons */
FReply OnConfirm();
FReply OnCancel();
/** Returns whether or not the user cancelled the operation */
bool WasUserCancelled();
private:
/** Owning window this widget is part of */
TWeakPtr< SWindow > WidgetWindow;
/** Whether or not the cancel button was clicked by the user */
bool bUserCancelled;
/** Detailsview used to display SettingsObjects, and allowing user to change options */
TSharedPtr<class IDetailsView> DetailsView;
/** Shared ptr to Confirm button */
TSharedPtr<SButton> ConfirmButton;
};