Stream Chat Unreal SDK
Loading...
Searching...
No Matches
TimestampWidget.h
1// Copyright 2022 Stream.IO, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Channel/Message.h"
6#include "Components/Image.h"
7#include "Components/TextBlock.h"
8#include "CoreMinimal.h"
9#include "StreamWidget.h"
10#include "TextBubbleWidget.h"
11
12#include "TimestampWidget.generated.h"
13
17UCLASS()
18class STREAMCHATUI_API UTimestampWidget final : public UStreamWidget
19{
20 GENERATED_BODY()
21
22public:
23 UTimestampWidget();
24 UFUNCTION(BlueprintCallable, Category = "Stream Chat")
25 void Setup(const FMessage& InMessage, bool bInShowUserName, bool bInShowMessageState);
26
27protected:
28 UPROPERTY(meta = (BindWidget))
29 UTextBlock* UserTextBlock;
30
31 UPROPERTY(meta = (BindWidget))
32 UImage* MessageStateIconImage;
33
34 UPROPERTY(meta = (BindWidget))
35 UTextBlock* DateTimeTextBlock;
36
37 UPROPERTY(EditAnywhere, Category = Defaults)
38 UTexture2D* IconClock;
39
40 UPROPERTY(EditAnywhere, Category = Defaults)
41 UTexture2D* IconCheck;
42
43 UPROPERTY(EditAnywhere, Category = Defaults)
44 UTexture2D* IconCheckAll;
45
46 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Setup)
47 FMessage Message;
48
49 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Setup)
50 bool bShowUserName;
51
52 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Setup)
53 bool bShowMessageState;
54
55private:
56 virtual void OnSetup() override;
57 virtual void NativePreConstruct() override;
58
59 UTexture2D* GetStatusIcon() const;
60 FText GetTimestampText() const;
61 static FText GetDayOfWeek(const FDateTime&);
62};
Represents a Stream Chat message.
Definition: Message.h:66