123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- #pragma once
- #include "Components/Widget.h"
- #include "SAkItemProperties.h"
- #include "Kismet/BlueprintFunctionLibrary.h"
- #include "Widgets/Text/STextBlock.h"
- #include "AkItemProperties.generated.h"
- class IMenu;
- class SButton;
- DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnItemPropertySelectionChanged, FString, PropertySelected);
- DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnItemPropertyDragDetected, FString, PropertyDragged);
- USTRUCT(BlueprintType)
- struct AKAUDIO_API FAkPropertyToControl
- {
- GENERATED_BODY()
-
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = ItemProperty, meta = (DisplayName = "Property"))
- FString ItemProperty;
- };
- UCLASS()
- class AKAUDIO_API UAkItemPropertiesConv : public UBlueprintFunctionLibrary
- {
- GENERATED_BODY()
- public:
- UAkItemPropertiesConv(const class FObjectInitializer& ObjectInitializer);
-
- UFUNCTION(BlueprintPure, meta = (DisplayName = "ToString (FAkPropertyToControl)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Utilities|String")
- static FString Conv_FAkPropertyToControlToString(const FAkPropertyToControl& INAkPropertyToControl);
-
- UFUNCTION(BlueprintPure, meta = (DisplayName = "ToText (FAkPropertyToControl)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Utilities|Text")
- static FText Conv_FAkPropertyToControlToText(const FAkPropertyToControl& INAkPropertyToControl);
- };
- UCLASS(config = Editor, defaultconfig)
- class AKAUDIO_API UAkItemProperties : public UWidget
- {
- GENERATED_BODY()
- public:
- UAkItemProperties(const FObjectInitializer& ObjectInitializer);
- typedef TSlateDelegates< TSharedPtr< FString > >::FOnSelectionChanged FOnSelectionChanged;
-
- UPROPERTY(BlueprintAssignable, Category = "Widget Event")
- FOnItemPropertySelectionChanged OnSelectionChanged;
-
- UPROPERTY(BlueprintAssignable, Category = "Widget Event")
- FOnItemPropertyDragDetected OnPropertyDragged;
-
- UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audiokinetic")
- FString GetSelectedProperty() const;
-
- UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audiokinetic")
- FString GetSearchText() const;
-
- UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audiokinetic")
- void SetSearchText(const FString& newText);
-
- virtual void ReleaseSlateResources(bool bReleaseChildren) override;
-
- #if WITH_EDITOR
- virtual const FText GetPaletteCategory() override;
- #endif
- protected:
-
- virtual TSharedRef<SWidget> RebuildWidget() override;
-
- private:
-
- void PropertySelectionChanged(TSharedPtr< FString > PropertySelected, ESelectInfo::Type SelectInfo);
-
- FReply HandleOnDragDetected(const FGeometry& Geometry, const FPointerEvent& MouseEvent);
- private:
-
- TSharedPtr<STextBlock> PropertyTextBlock;
-
- TSharedPtr<SAkItemProperties> WwiseProperties;
- };
|