Space Plunder
Loading...
Searching...
No Matches
UMatchFinishedWidget Class Reference

#include <MatchFinishedWidget.h>

Inheritance diagram for UMatchFinishedWidget:

Public Member Functions

virtual bool Initialize () override
 
void MatchOver (FMatchState MatchState, const TArray< FTeamScoreData > &Scores)
 
void OnMatchOver (FMatchState MatchState, const TArray< FTeamScoreData > &Scores)
 
void RoundOver (FMatchState MatchState, const TArray< FTeamScoreData > &Scores)
 
void OnRoundOver (FMatchState MatchState, const TArray< FTeamScoreData > &Scores)
 
void LeaveMatch ()
 

Protected Attributes

FMatchState MultiplayerMatchState
 
TArray< FTeamScoreDataAllScores
 

Member Function Documentation

◆ Initialize()

bool UMatchFinishedWidget::Initialize ( )
overridevirtual
9{
10 const bool Success = Super::Initialize();
11 if(!Success) return false;
12 // if (!ensure(PingTextBlock != nullptr)) return false;
13 return true;
14}

◆ LeaveMatch()

void UMatchFinishedWidget::LeaveMatch ( )
35{
36 const UWorld* World = GetWorld();
37 if(!ensure(World != nullptr)) return;
38 APlayerController* PlayerControllerReference = GetOwningPlayer();
39 if(!ensure(PlayerControllerReference != nullptr)) return;
40 if(World->GetNetMode() == NM_ListenServer)
41 {
42 AGameModeBase* GameMode = World->GetAuthGameMode<AGameModeBase>();
43 if(GameMode)
44 {
45 // MenuSystem->DestroySession();
46 GameMode->ReturnToMainMenuHost();
47 }
48 }
49 else
50 {
51 if (PlayerControllerReference)
52 {
53 // MenuSystem->DestroySession();
54 PlayerControllerReference->ClientReturnToMainMenuWithTextReason(FText::FromString("Back to main menu"));
55 }
56 }
57}

◆ MatchOver()

void UMatchFinishedWidget::MatchOver ( FMatchState MatchState,
const TArray< FTeamScoreData > & Scores )
17{
18 MultiplayerMatchState = MatchState;
19 AllScores = Scores;
20 OnMatchOver(MatchState, Scores);
21 FInputModeUIOnly UIOnly;
22 GetOwningPlayer()->bShowMouseCursor = true;
23 GetOwningPlayer()->SetInputMode(UIOnly);
24
25}
void OnMatchOver(FMatchState MatchState, const TArray< FTeamScoreData > &Scores)
FMatchState MultiplayerMatchState
Definition MatchFinishedWidget.h:33
TArray< FTeamScoreData > AllScores
Definition MatchFinishedWidget.h:35

◆ OnMatchOver()

void UMatchFinishedWidget::OnMatchOver ( FMatchState MatchState,
const TArray< FTeamScoreData > & Scores )

◆ OnRoundOver()

void UMatchFinishedWidget::OnRoundOver ( FMatchState MatchState,
const TArray< FTeamScoreData > & Scores )

◆ RoundOver()

void UMatchFinishedWidget::RoundOver ( FMatchState MatchState,
const TArray< FTeamScoreData > & Scores )
28{
29 MultiplayerMatchState = MatchState;
30 AllScores = Scores;
31 OnRoundOver(MatchState, Scores);
32}
void OnRoundOver(FMatchState MatchState, const TArray< FTeamScoreData > &Scores)

Member Data Documentation

◆ AllScores

TArray<FTeamScoreData> UMatchFinishedWidget::AllScores
protected

◆ MultiplayerMatchState

FMatchState UMatchFinishedWidget::MultiplayerMatchState
protected

The documentation for this class was generated from the following files: