5#include "Channel/Message.h"
6#include "Components/Button.h"
7#include "Components/Image.h"
8#include "Components/TextBlock.h"
9#include "ContextMenuAction.h"
10#include "CoreMinimal.h"
11#include "StreamWidget.h"
13#include "ContextMenuButtonWidget.generated.h"
15DECLARE_MULTICAST_DELEGATE(FContextMenuButtonClicked);
18enum class EContextMenuButtonPosition : uint8
29class STREAMCHATUI_API UContextMenuButtonWidget final : public UStreamWidget
34 UContextMenuButtonWidget();
35 UFUNCTION(BlueprintCallable, Category = "Stream Chat")
36 void Setup(const
FMessage& InMessage, EContextMenuButtonPosition InPosition, UContextMenuAction* InAction);
39 UPROPERTY(meta = (BindWidget))
41 UPROPERTY(meta = (BindWidget))
43 UPROPERTY(meta = (BindWidget))
44 UImage* TopBorderImage;
45 UPROPERTY(meta = (BindWidget))
46 UTextBlock* TextBlock;
48 UPROPERTY(EditAnywhere, Category = Button)
49 UTexture2D* TopButtonTexture;
50 UPROPERTY(EditAnywhere, Category = Button)
51 UTexture2D* MidButtonTexture;
52 UPROPERTY(EditAnywhere, Category = Button)
53 UTexture2D* BottomButtonTexture;
55 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Setup)
57 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Setup)
58 EContextMenuButtonPosition Position;
61 virtual
void OnSetup() override;
62 virtual
void NativePreConstruct() override;
63 virtual
void NativeConstruct() override;
64 virtual
void NativeDestruct() override;
67 void OnButtonClicked();
69 UTexture2D* GetButtonTexture() const;
70 FMargin GetButtonMargin() const;
71 const FLinearColor& GetIconColor() const;
72 const FLinearColor& GetTextColor() const;
74 UPROPERTY(EditAnywhere, Instanced, Category = Setup)
75 UContextMenuAction* Action;
Represents a Stream Chat message.
Definition: Message.h:66