123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- #pragma once
- #include "AkAcousticTexture.h"
- #include "WwiseUEFeatures.h"
- #include "AssetThumbnail.h"
- #include "Framework/Application/SlateApplication.h"
- #include "Widgets/SCompoundWidget.h"
- #include "Editor.h"
- #if WITH_EDITOR
- #define GEOMETRY_EDIT_DISPLAY_NAME "Brush Editing Mode"
- #endif
- class UAkSurfaceReflectorSetComponent;
- class IDetailLayoutBuilder;
- class IDetailCategoryBuilder;
- class UTransBuffer;
- class STextBlock;
- struct FAkSurfacePoly;
- class SAcousticSurfacesLabels : public SCompoundWidget
- {
- public:
- SLATE_BEGIN_ARGS(SAcousticSurfacesLabels) {}
- SLATE_END_ARGS()
- AUDIOKINETICTOOLS_API void Construct(const FArguments& InArgs, TArray<TWeakObjectPtr<UObject>> ObjectsBeingCustomized);
- private:
- TArray<TWeakObjectPtr<UObject>> ComponentsBeingCustomized;
-
- EVisibility TransmissionLossEnableSurfaceVisibility();
- };
- class SAcousticSurfacesController : public SCompoundWidget
- {
- public:
- SLATE_BEGIN_ARGS(SAcousticSurfacesController) {}
- SLATE_END_ARGS()
- AUDIOKINETICTOOLS_API void Construct(const FArguments& InArgs
- ,TArray<TWeakObjectPtr<UObject>> ObjectsBeingCustomized
- ,const TSharedPtr<IDetailLayoutBuilder>& InLayoutBuilder
- );
-
- ~SAcousticSurfacesController();
- private:
- void BuildSlate();
-
- TWeakPtr<IDetailLayoutBuilder> LayoutBuilder;
-
- TArray<TWeakObjectPtr<UObject>> ComponentsToEdit;
-
- typedef TMap<UAkSurfaceReflectorSetComponent*, TSet<int>> ReflectorSetsSelectedFaces;
- ReflectorSetsSelectedFaces ReflectorSetsFacesToEdit;
- void InitReflectorSetsFacesToEdit();
-
- FAkSurfacePoly& GetAcousticSurfaceChecked(UAkSurfaceReflectorSetComponent* reflectorSet, int faceIndex);
-
- void RefreshEditor(bool reinitVisualizers = false) const;
- void RefreshLayout() const;
- void BeginModify(FText TransactionText);
- void EndModify();
- FDelegateHandle OnPropertyChangedHandle;
- void OnPropertyChanged(UObject* ObjectBeingModified, FPropertyChangedEvent& PropertyChangedEvent);
-
- int NumFacesSelected = 0;
- FText GetSelectionText() const;
- FText GetSelectionTextTooltip() const;
-
- bool ApplyToAllFaces = false;
- void OnEditorModeChanged(const FEditorModeID& InEditorModeID, bool bIsEnteringMode);
-
- void UpdateCurrentValues();
-
- bool TexturesDiffer = false;
- UAkAcousticTexture* CurrentTexture = nullptr;
- EVisibility OverrideTextureControlsVisibility();
- FReply OnOverrideTextureButtonClicked();
- UAkAcousticTexture* GetCollectiveTexture(bool& ValuesDiffer);
- void OnTextureAssetChanged(const FAssetData& InAssetData);
- FString GetSelectedTextureAssetPath() const;
-
- EVisibility TransmissionLossEnableSurfaceVisibility();
-
- bool OcclusionsDiffer = false;
- float CurrentOcclusion = 0.0f;
- EVisibility OverrideOcclusionControlsVisibility();
- FReply OnOverrideOcclusionButtonClicked();
- float GetCollectiveOcclusion(bool& ValuesDiffer);
- TOptional<float> GetOcclusionSliderValue() const;
- void OnOcclusionSliderChanged(float NewValue, ETextCommit::Type Commit);
-
- bool EnablementsDiffer = false;
- bool CurrentEnablement = false;
- bool GetCollectiveEnableSurface(bool& ValuesDiffer);
- ECheckBoxState GetEnableSurfaceCheckBoxState() const;
- void OnEnableCheckboxChanged(ECheckBoxState NewState);
- #if AK_SUPPORT_WAAPI
-
- void RegisterTextureDeletedCallback();
-
- void RemoveTextureDeletedCallback();
- uint64 TextureDeleteSubscriptionID;
- #endif
- };
|