#include <LobbyMenuSystem.h>
◆ AddPlayer()
| void ULobbyMenuSystem::AddPlayer |
( |
const FUserProfile & | Player | ) |
const |
63{
65}
void AddPlayer(const FUserProfile &Player)
Definition PlayerCardList.cpp:29
◆ CancelCountdown()
| void ULobbyMenuSystem::CancelCountdown |
( |
| ) |
|
202{
203 UE_LOG(LogMenuSystem,
Warning, TEXT(
"Cancel Timer Request"));
205 {
208
209 UE_LOG(LogMenuSystem,
Warning, TEXT(
"Cancel Timer"));
215 }
216}
◆ ClientMenuButtonSelected()
| void ULobbyMenuSystem::ClientMenuButtonSelected |
( |
const int32 | Index | ) |
|
|
private |
140{
141 switch (Index)
142 {
143
144 default:
145 case 0:
146 {
147
148
149
150
151 }
152 break;
153 case 1:
154
155 break;
156 case 2:
157 case 3:
158 case 4:
159 break;
160 case 5:
162 break;
163 case 6:
164 break;
165 }
166}
◆ Countdown()
| void ULobbyMenuSystem::Countdown |
( |
| ) |
|
|
private |
186{
191 {
197
198 }
199}
◆ CountdownCanceled()
| void ULobbyMenuSystem::CountdownCanceled |
( |
| ) |
|
|
protected |
◆ CountdownStarted()
| void ULobbyMenuSystem::CountdownStarted |
( |
| ) |
|
|
protected |
◆ GetIsHostLobby()
| bool ULobbyMenuSystem::GetIsHostLobby |
( |
| ) |
const |
|
inline |
◆ GetIsLoading()
| bool ULobbyMenuSystem::GetIsLoading |
( |
| ) |
const |
|
inline |
◆ Initialize()
| bool ULobbyMenuSystem::Initialize |
( |
| ) |
|
|
overrideprotectedvirtual |
13{
14 const bool Success = Super::Initialize();
16 if (!ensure(
LobbyMenu !=
nullptr))
return false;
20 return true;
21}
◆ LeaveLobby()
| void ULobbyMenuSystem::LeaveLobby |
( |
| ) |
|
Problem code with STEAM and not using Presence //
219{
220 const UWorld* World = GetWorld();
221 if(!ensure(World != nullptr)) return;
222 APlayerController* PlayerController = GetOwningPlayer();
223 if(World->GetNetMode() == NM_ListenServer)
224 {
225 AGameModeBase* GameMode = World->GetAuthGameMode<AGameModeBase>();
226 if(GameMode)
227 {
228 GameMode->ReturnToMainMenuHost();
229 }
230 }
231 else
232 {
233 if(PlayerController != nullptr)
234 {
235 PlayerController->ClientReturnToMainMenuWithTextReason(FText::FromString("Back to main menu"));
236 }
237 }
241 {
243 }
244}
◆ LoadingStarted()
| void ULobbyMenuSystem::LoadingStarted |
( |
| ) |
|
|
protected |
◆ MenuButtonSelected()
| void ULobbyMenuSystem::MenuButtonSelected |
( |
const int32 | Index | ) |
|
|
private |
69{
70 if(GetOwningPlayer()->GetLocalRole() != ROLE_Authority)
71 {
73 return;
74 }
75 switch (Index)
76 {
77
78 default:
79 case 0:
81 {
83 if(LobbyGameMode ==
nullptr){UE_LOG(LogMenuSystem,
Error, TEXT(
"Lobby Game Mode Cast Failed"));
return;}
84
86 }
87 else
88 {
90 if(LobbyGameMode ==
nullptr){UE_LOG(LogMenuSystem,
Error, TEXT(
"Lobby Game Mode Cast Failed"));
return;}
91
93 }
94 break;
95 case 1:
96
97 {
99 if(LobbyGameMode ==
nullptr){UE_LOG(LogMenuSystem,
Error, TEXT(
"Lobby Game Mode Cast Failed"));
return;}
100
102 }
103 break;
104 case 2:
105
106 {
108 if(LobbyGameMode ==
nullptr){UE_LOG(LogMenuSystem,
Error, TEXT(
"Lobby Game Mode Cast Failed"));
return;}
109
111 }
112 break;
113 case 3:
114
115 {
117 if(LobbyGameMode ==
nullptr){UE_LOG(LogMenuSystem,
Error, TEXT(
"Lobby Game Mode Cast Failed"));
return;}
118
120 }
121 break;
122 case 4:
123
124 {
126 if(LobbyGameMode ==
nullptr){UE_LOG(LogMenuSystem,
Error, TEXT(
"Lobby Game Mode Cast Failed"));
return;}
127
129 }
130 break;
131 case 5:
133 break;
134 case 6:
135 break;
136 }
137}
◆ NativeConstruct()
| void ULobbyMenuSystem::NativeConstruct |
( |
| ) |
|
|
overridevirtual |
33{
34 Super::NativeConstruct();
37 if(GetOwningPlayer() != nullptr)
38 {
39 if(GetOwningPlayer()->GetLocalRole() == ROLE_Authority)
40 {
41
44
45 }
46 else
47 {
50 }
51 }
53
54}
◆ NativePreConstruct()
| void ULobbyMenuSystem::NativePreConstruct |
( |
| ) |
|
|
overridevirtual |
25{
26 Super::NativePreConstruct();
29
30}
◆ SetCountdownTextBlock()
| void ULobbyMenuSystem::SetCountdownTextBlock |
( |
| ) |
const |
|
private |
◆ SetPlayers()
| void ULobbyMenuSystem::SetPlayers |
( |
const TArray< FUserProfile > & | Players | ) |
const |
57{
59 UE_LOG(LogMenuSystem,
Warning, TEXT(
"Set Players in Lobby Widget"));
60}
void SetPlayers(const TArray< FUserProfile > &Players)
Definition PlayerCardList.cpp:40
◆ StartCountdown()
| void ULobbyMenuSystem::StartCountdown |
( |
const int32 | Delay | ) |
|
◆ bCounting
| bool ULobbyMenuSystem::bCounting = false |
|
private |
◆ bHostLobby
| bool ULobbyMenuSystem::bHostLobby = false |
|
private |
◆ bIsLoading
| bool ULobbyMenuSystem::bIsLoading = false |
|
private |
◆ ClientButtons
| TArray<bool> ULobbyMenuSystem::ClientButtons = { true, false, false, false, false } |
|
protected |
55{ true, false, false, false, false };
◆ CountDownTextBlock
| class UTextBlock* ULobbyMenuSystem::CountDownTextBlock = nullptr |
|
protected |
◆ CountdownTime
| int32 ULobbyMenuSystem::CountdownTime = 10 |
|
private |
◆ CountdownTimerHandle
| FTimerHandle ULobbyMenuSystem::CountdownTimerHandle |
|
private |
◆ CountdownTimeTotal
| int32 ULobbyMenuSystem::CountdownTimeTotal = 15 |
|
private |
◆ LobbyMenu
◆ PlayerCardList
◆ StartButtonAltText
| FString ULobbyMenuSystem::StartButtonAltText = "Cancel" |
|
protected |
◆ StartButtonText
| FString ULobbyMenuSystem::StartButtonText = "Start Game" |
|
protected |
The documentation for this class was generated from the following files:
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/MenuSystem/Source/MenuSystem/Public/Widgets/Multiplayer/LobbyMenuSystem.h
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/MenuSystem/Source/MenuSystem/Private/Widgets/Multiplayer/LobbyMenuSystem.cpp