#include <ScoreboardWidget.h>
◆ UScoreboardWidget()
| UScoreboardWidget::UScoreboardWidget |
( |
const FObjectInitializer & | ObjectInitializer | ) |
|
17 : Super(ObjectInitializer)
18{
19 const ConstructorHelpers::FClassFinder<UScoreboardRowWidget> ScoreboardRowWidgetBP(TEXT("/MenuSystem/Widgets/Multiplayer/Scoreboard/WBP_ScoreboardRow"));
20 if (!ensure(ScoreboardRowWidgetBP.Class != nullptr)) return;
22 const ConstructorHelpers::FClassFinder<UScoreboardTeamWidget> ScoreboardTeamWidgetBP(TEXT("/MenuSystem/Widgets/Multiplayer/Scoreboard/WBP_ScoreboardTeam"));
23 if (!ensure(ScoreboardTeamWidgetBP.Class != nullptr)) return;
25}
◆ CreateTeamWidgets()
| void UScoreboardWidget::CreateTeamWidgets |
( |
| ) |
|
|
private |
Remove just used SetTotalScores instead.
51{
52
53
54
55
56
57
58
59
60
61
62
63
64
65}
◆ GetTeams()
| void UScoreboardWidget::GetTeams |
( |
| ) |
|
◆ Initialize()
| bool UScoreboardWidget::Initialize |
( |
| ) |
|
|
overridevirtual |
28{
29 const bool Success = Super::Initialize();
34 return true;
35}
◆ NativeConstruct()
| void UScoreboardWidget::NativeConstruct |
( |
| ) |
|
|
overridevirtual |
38{
39 Super::NativeConstruct();
41
42}
◆ NativePreConstruct()
| void UScoreboardWidget::NativePreConstruct |
( |
| ) |
|
|
overridevirtual |
45{
46 Super::NativePreConstruct();
47}
◆ SetNumberOfTeams()
| void UScoreboardWidget::SetNumberOfTeams |
( |
int32 | Amount | ) |
|
|
inline |
◆ SetTotalScores()
| void UScoreboardWidget::SetTotalScores |
( |
TArray< FTeamScoreData > | Score, |
|
|
int32 | Goal ) |
82{
86 {
89 if(ScoreboardTeam ==
nullptr){UE_LOG(LogMenuSystem,
Warning, TEXT(
"ScoreboardTeam Failed to Create"));
return;}
91 ScoreboardTeam->
SetTeam(
"Team Name", Data.TeamID,
nullptr);
94
96 }
97}
Definition MultiplayerData.h:37
◆ UpdateScoreboard()
| void UScoreboardWidget::UpdateScoreboard |
( |
| ) |
|
101{
102
103
104
106 {
107 TeamWidget->PlayersScrollBox->ClearChildren();
108 const int32 TeamWidgetID = TeamWidget->GetTeamID();
109 int32 Index = 0;
111 {
112
114 if(MenuPlayerState ==
nullptr){UE_LOG(LogMenuSystem,
Error, TEXT(
"Scoreboard Failed to cast Menu Player State"));
return;}
115
116 if(TeamWidgetID == MenuPlayerState->
GetTeamID())
117 {
119 if(ScoreboardRow ==
nullptr){UE_LOG(LogMenuSystem,
Error, TEXT(
"Scoreboard Row Failed to Create"));
return;}
123 TeamWidget->PlayersScrollBox->AddChild(ScoreboardRow);
124 }
125 ++Index;
126 }
127 }
128}
◆ UpdateScoreboardPlayers()
| void UScoreboardWidget::UpdateScoreboardPlayers |
( |
TArray< APlayerState * > | PlayerStates | ) |
|
136{
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157}
◆ VisibilityChanged()
| void UScoreboardWidget::VisibilityChanged |
( |
ESlateVisibility | NewVisibility | ) |
|
|
private |
68{
69 if(IsVisible())
70 {
73 }
74 else
75 {
77 }
78}
◆ AllPlayerStates
| TArray<APlayerState*> UScoreboardWidget::AllPlayerStates |
|
private |
◆ GameModeTextBlock
| class UTextBlock* UScoreboardWidget::GameModeTextBlock |
|
protected |
◆ ScoreboardRowWidgetClass
◆ ScoreboardTeamWidgetClass
◆ ScoreboardUpdateFrequency
| float UScoreboardWidget::ScoreboardUpdateFrequency = 0.5f |
|
protected |
◆ Teams
| int32 UScoreboardWidget::Teams = 1 |
|
protected |
◆ TeamsVerticalBox
| class UVerticalBox* UScoreboardWidget::TeamsVerticalBox |
|
protected |
◆ TeamWidgets
◆ UpdateScoreboardTimerHandle
| FTimerHandle UScoreboardWidget::UpdateScoreboardTimerHandle |
|
private |
The documentation for this class was generated from the following files:
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/MenuSystem/Source/MenuSystem/Public/Widgets/Multiplayer/ScoreboardWidget.h
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/MenuSystem/Source/MenuSystem/Private/Widgets/Multiplayer/ScoreboardWidget.cpp