Files
matt kuhlenschmidt 3fa44160fd Improved the details panel root object customization API to support multiple objects in the "root object set". Deprecated old functionality and removed pass through customizations that are no longer needed
#rb none

#ROBOMERGE-OWNER: matt.kuhlenschmidt
#ROBOMERGE-AUTHOR: matt.kuhlenschmidt
#ROBOMERGE-SOURCE: CL 11382968 via CL 11382988 via CL 11382990
#ROBOMERGE-BOT: (v654-11333218)

[CL 11383722 by matt kuhlenschmidt in Main branch]
2020-02-12 09:41:11 -05:00

49 lines
1.5 KiB
C++

// Copyright 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;
/** 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;
};