Space Plunder
Loading...
Searching...
No Matches
ChatTextWidget.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Blueprint/UserWidget.h"
7#include "Data/ChatData.h"
8#include "ChatTextWidget.generated.h"
9
10UCLASS()
11class CHATSYSTEM_API UChatTextWidget : public UUserWidget
12{
13 GENERATED_BODY()
14
15public:
16
17 virtual void NativeConstruct() override;
18
19
20
21 UFUNCTION(BlueprintCallable, Category="Chat System|Widget")
22 void SetTypeColor();
23
24 UFUNCTION()
25 ESlateVisibility PrefixVisibility();
26
27 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Chat System|Widget")
28 FString PlayerName;
29 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Chat System|Widget")
30 FString ChatMessage;
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Chat System|Widget")
32 EChatSystemCategory ChatCategory;
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Chat System|Widget")
35
36 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Chat System|Widget")
37 bool bPlayerOwnedChat = false;
38
39 UFUNCTION(BlueprintCallable, Category="Chat System|Widget")
40 void StartTimeoutText(const float Lifetime);
41
42protected:
43 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
44 class UTextBlock* PlayerNameTextBlock;
45 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
46 class UTextBlock* ChatTextBlock;
47 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
48 class UTextBlock* TimeTextBlock;
49 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
50 class UTextBlock* PrefixTextBlock;
51
52private:
53 FTimerHandle LifetimeTimerHandle;
54
55 void TimeoutText();
56
57};
EChatSystemCategory
Definition ChatData.h:14
EChatSystemMessageType
Definition ChatData.h:25
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition ChatTextWidget.h:12