AkSurfaceReflectorSetDetailsCustomization.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. #pragma once
  16. #include "PropertyEditorModule.h"
  17. #include "IDetailCustomization.h"
  18. #include "UObject/StrongObjectPtr.h"
  19. //////////////////////////////////////////////////////////////////////////
  20. // FAkSurfaceReflectorSetDetailsCustomization
  21. class IDetailCategoryBuilder;
  22. class STextBlock;
  23. class UAkSurfaceReflectorSetComponent;
  24. class FAkSurfaceReflectorSetDetailsCustomization : public IDetailCustomization
  25. {
  26. public:
  27. FAkSurfaceReflectorSetDetailsCustomization();
  28. ~FAkSurfaceReflectorSetDetailsCustomization();
  29. // Makes a new instance of this detail layout class for a specific detail view requesting it
  30. static TSharedRef<IDetailCustomization> MakeInstance();
  31. // IDetailCustomization interface
  32. virtual void CustomizeDetails(const TSharedPtr<IDetailLayoutBuilder>& InDetailBuilder) override;
  33. virtual void CustomizeDetails(IDetailLayoutBuilder& InDetailBuilder) override;
  34. // End of IDetailCustomization interface
  35. private:
  36. TWeakPtr<IDetailLayoutBuilder> DetailBuilder;
  37. TSharedPtr<STextBlock> SelectionInfoLabel;
  38. TArray<TWeakObjectPtr<UObject>> ObjectsBeingCustomized;
  39. TWeakObjectPtr<UAkSurfaceReflectorSetComponent> ReflectorSetBeingCustomized;
  40. FReply OnEnableEditModeClicked();
  41. FReply OnDisableEditModeClicked();
  42. // In geometry edit mode, when the face selection is changed for an actor, the OnObjectModified delegate is broadcast before the selected faces are updated.
  43. // For that reason, we use a flag to indicate when an object has been modified this frame.
  44. // That flag is used in OnRedrawViewports - which happens later - to refresh the details panel in case the selected faces have changed.
  45. bool SelectedObjectModifiedThisFrame = false;
  46. void OnObjectModified(UObject* Object);
  47. void OnRedrawViewports();
  48. void OnEnableValueChanged();
  49. void OnGeometryChanged();
  50. void SetupGeometryModificationHandlers();
  51. };