123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- #pragma once
- #include "Components/Widget.h"
- #include "WaapiPicker/SWaapiPicker.h"
- #include "AkSlider.h"
- #include "AkWwiseTree.generated.h"
- class IMenu;
- class SButton;
- DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnItemSelectionChanged, FGuid, ItemSelectedID);
- DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnItemDragDetected, FGuid, ItemDraggedID, FString, ItemDraggedName);
- UCLASS(config = Editor, defaultconfig)
- class AKAUDIO_API UAkWwiseTree : public UWidget
- {
- GENERATED_BODY()
- public:
- UAkWwiseTree(const FObjectInitializer& ObjectInitializer);
- typedef TSlateDelegates< TSharedPtr< FWwiseTreeItem > >::FOnSelectionChanged FOnSelectionChanged;
-
- UPROPERTY(BlueprintAssignable, Category = "Widget Event")
- FOnItemSelectionChanged OnSelectionChanged;
-
- UPROPERTY(BlueprintAssignable, Category = "Widget Event")
- FOnItemDragDetected OnItemDragged;
-
- UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audiokinetic")
- FAkWwiseObjectDetails GetSelectedItem() const;
-
- UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audiokinetic")
- FString GetSearchText() const;
-
- UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audiokinetic")
- void SetSearchText(const FString& newText);
-
- virtual void SynchronizeProperties() override;
-
-
- virtual void ReleaseSlateResources(bool bReleaseChildren) override;
-
- #if WITH_EDITOR
- virtual const FText GetPaletteCategory() override;
- #endif
- protected:
-
- virtual TSharedRef<SWidget> RebuildWidget() override;
-
- private:
-
- void TreeSelectionChanged(TSharedPtr< FWwiseTreeItem > TreeItem, ESelectInfo::Type SelectInfo);
-
- FReply HandleOnDragDetected(const FGeometry& Geometry, const FPointerEvent& MouseEvent);
- private:
-
- TSharedPtr<STextBlock> ItemTextBlock;
-
- TSharedPtr<SWaapiPicker> WaapiPicker;
- };
|