LEAP Documentation 40220
Documentation for the LEAP project
ScoreboardWidget.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8#include "ScoreboardWidget.generated.h"
9
11
15UCLASS()
16class PROJECTX_API UScoreboardWidget : public UAdvancedUserWidget
17{
18 GENERATED_UCLASS_BODY()
19
20public:
21 virtual void OnWidgetVisible_Implementation(const UObject* ContextObject = nullptr) override;
22
23 UFUNCTION(BlueprintCallable, Category = Scoreboard)
24 virtual void UpdateScoreboard(bool bSort = true, bool bCleanUp = true);
25
26 UFUNCTION()
27 virtual void UpdatePlayerStateLists();
28 UFUNCTION(BlueprintCallable)
29 virtual void SortScoreboardLists(bool bForce = false);
30
31protected:
32 UFUNCTION()
33 virtual void PlayerStateAdded(APlayerState* PlayerState);
34 UFUNCTION()
35 virtual void PlayerStateRemoved(APlayerState* PlayerState);
36
37 UFUNCTION(BlueprintImplementableEvent, Category = Scoreboard)
38 UUserWidget* AddScoreboardEntry(AProjectXPlayerState* PlayerState);
39
40 UFUNCTION(BlueprintImplementableEvent, Category = Scoreboard)
41 UAdvancedVerticalBox* GetTeamEntryContainer(uint8 Team);
42
43protected:
44 UPROPERTY()
45 TMap<uint32, TWeakObjectPtr<AProjectXPlayerState>> PlayerStateMap;
46 UPROPERTY()
47 TMap<uint32, TWeakObjectPtr<UUserWidget>> ScoreboardEntryMap;
48 /* Delay between re sorts*/
49 UPROPERTY(EditDefaultsOnly)
50 float SortTime;
51 FTimerHandle SortTimerHandle;
52};
Definition: ProjectXPlayerState.h:238
uint8 Team
Definition: ProjectXPlayerState.h:720
Definition: AdvancedUserWidget.h:30
Definition: AdvancedVerticalBox.h:11
Definition: ScoreboardWidget.h:17