123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- #pragma once
- #include "Components/Widget.h"
- #include "SAkItemBoolProperties.h"
- #include "Kismet/BlueprintFunctionLibrary.h"
- #include "Widgets/Text/STextBlock.h"
- #include "AkItemBoolProperties.generated.h"
- class IMenu;
- class SButton;
- DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnItemBoolPropertySelectionChanged, FString, PropertySelected);
- DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnItemBoolPropertyDragDetected, FString, PropertyDragged);
- USTRUCT(BlueprintType)
- struct AKAUDIO_API FAkBoolPropertyToControl
- {
- GENERATED_BODY()
-
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = ItemProperty, meta = (DisplayName = "Property"))
- FString ItemProperty;
- };
- UCLASS()
- class AKAUDIO_API UAkItemBoolPropertiesConv : public UBlueprintFunctionLibrary
- {
- GENERATED_BODY()
- public:
- UAkItemBoolPropertiesConv(const class FObjectInitializer& ObjectInitializer);
-
- UFUNCTION(BlueprintPure, meta = (DisplayName = "ToString (FAkBoolPropertyToControl)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Utilities|String")
- static FString Conv_FAkBoolPropertyToControlToString(const FAkBoolPropertyToControl& INAkBoolPropertyToControl);
-
- UFUNCTION(BlueprintPure, meta = (DisplayName = "ToText (FAkBoolPropertyToControl)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Utilities|Text")
- static FText Conv_FAkBoolPropertyToControlToText(const FAkBoolPropertyToControl& INAkBoolPropertyToControl);
- };
- UCLASS(config = Editor, defaultconfig)
- class AKAUDIO_API UAkItemBoolProperties : public UWidget
- {
- GENERATED_BODY()
- public:
- UAkItemBoolProperties(const FObjectInitializer& ObjectInitializer);
- typedef TSlateDelegates< TSharedPtr< FString > >::FOnSelectionChanged FOnSelectionChanged;
-
- UPROPERTY(BlueprintAssignable, Category = "Widget Event")
- FOnItemBoolPropertySelectionChanged OnSelectionChanged;
-
- UPROPERTY(BlueprintAssignable, Category = "Widget Event")
- FOnItemBoolPropertyDragDetected 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<SAkItemBoolProperties> WwiseProperties;
- };
|