Space Plunder
Loading...
Searching...
No Matches
MainMenuSystemWidget.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"
7#include "MainMenuSystemWidget.generated.h"
8
9UCLASS()
10class MENUSYSTEM_API UMainMenuSystemWidget : public UMenuSystemWidget
11{
12 GENERATED_BODY()
13
14
15public:
16 UMainMenuSystemWidget(const FObjectInitializer& ObjectInitializer);
17
18
19 void SelectIndex(uint32 Index);
20
21
22 virtual void SetServerList(const TArray<FServerRow>& ServerInfo) override;
23
24 virtual UWidget* NativeGetDesiredFocusTarget() const override;
25
26protected:
27 virtual bool Initialize() override;
28 virtual void NativeConstruct() override;
29
30 //- Overriden //
31 // virtual void SetFocusToFirstVisibleOption_Implementation() override;
32 virtual void ModalButtonSelected(const int32 Index) override;
33
34 UFUNCTION(BlueprintImplementableEvent, Category="Menu System")
35 void OnDifficultyChanged();
36
37 UFUNCTION(BlueprintCallable, Category="Menu System")
38 void SetDifficultyLevelText() const;
39
40 UFUNCTION(BlueprintCallable, Category="Menu System")
41 void LoginToEpicOnline() const;
42 //- For use when Coming back from another widget //
43 UFUNCTION(BlueprintCallable, Category="Menu System")
44 void ReturnToCurrentMenu();
45
46 UFUNCTION(BlueprintCallable, Category="Menu System")
47 void ReturnToMainMenu();
48 UFUNCTION(BlueprintCallable, Category="Menu System")
49 void ReturnToMultiplayerMenu();
50 //- Set Index to -1 to just set to Current (eg. Going back from another menu) //
51 UFUNCTION(BlueprintCallable, Category="Menu System")
52 void SetActiveMenu(const int32 Index, class UWidgetSwitcher* MenuSwitcherWidget);
53 UWidget* GetActiveMenuWidget() const;
54
55 UFUNCTION(BlueprintCallable, Category="Menu System")
56 class UWidgetSwitcher* GetActiveMenu() const;
57
58
59 UFUNCTION(BlueprintCallable, Category="Menu System")
60 void JoinButtonClicked();
61 UFUNCTION(BlueprintCallable, Category="Menu System")
62 void SearchServers();
63 UFUNCTION(BlueprintCallable, Category="Menu System")
64 void HostButtonClicked();
65
66 void UpdateServerRows();
67 UFUNCTION()
68 void NumberOnSliderChanged(float Value);
69 UFUNCTION()
70 void MinNumberOnSliderChanged(float Value);
71
72 //- Modals //
73 UFUNCTION(BlueprintCallable, Category="Menu System")
74 void OpenQuitConfirmationPopup();
75
76 //- Level Select //
77 UFUNCTION(BlueprintCallable, Category="Menu System")
78 void OpenLevelSelect(const EGameplayMode GameplayMode = EGameplayMode::Multiplayer, const bool bDebugLevels = false);
79
80 UFUNCTION(BlueprintCallable, Category="Menu System")
81 void BackOneMenu(bool bOpenConfirmation);
82
83
84 UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
85 bool bIsControllerInput = false;
86
87
88
89
90 UFUNCTION(BlueprintCallable, Category="Menu System")
91 void SetIsControllerInput(bool bIsNewController);
92 UPROPERTY(BlueprintReadWrite, Category="Menu System")
93 int32 ButtonFocused = 1;
94
95 //- What Page the Main Menu is currently on //
96 UPROPERTY(BlueprintReadWrite, Category="Menu System")
97 int32 MenuPageIndex = 0;
98 //- What Page the Multiplayer Menu is currently on //
99 UPROPERTY(BlueprintReadWrite, Category="Menu System")
100 int32 MultiplayerPageIndex = 0;
101
102 //- List of where the pages are kept, for quick reference //
103 const int32 MultiplayerPageIndexNumber = 4;
104 const int32 MainMenuPageIndexNumber = 2;
105 const int32 SignInPageIndexNumber = 1;
106
107
108 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Menu System")
109 class ULevelSelectionWidget* LevelSelectionWidget = nullptr;
110 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
111 class UOverlay* LevelSelectOverlay = nullptr;
112
113 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
114 class UPanelWidget* ModalPanel = nullptr;
115 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
116 class UPanelWidget* NotificationPanel = nullptr;
117
118
119 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
120 class UButton* StartScreenButton = nullptr;
121 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
122 class UButton* JoinButton = nullptr;
123
124 //- Sub Menus //
125 // UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
126 // class UWidgetSwitcher* MenuSwitcher = nullptr;
127 // UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
128 // class UWidgetSwitcher* MultiplayerMenuSwitcher = nullptr;
129
130 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
131 class UCommonActivatableWidgetSwitcher* MenuSwitcher = nullptr;
132 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
133 class UCommonActivatableWidgetSwitcher* MultiplayerMenuSwitcher = nullptr;
134
135
136 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
137 class UWidget* StartScreen = nullptr;
138
139
140
141 UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
142 class UTextBlock* GameVersionText = nullptr;
143 UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
144 class UTextBlock* UserNameText = nullptr;
145
146 UPROPERTY(BlueprintReadonly, Category="Menu System")
147 bool bSearchingForServersInProgress = false;
148
149 UPROPERTY(BlueprintReadWrite, Category="Menu System")
150 bool bAllowJoinInProgress = false;
151 UPROPERTY(BlueprintReadWrite, Category="Menu System")
152 bool bAllowInvites = false;
153 UPROPERTY(BlueprintReadWrite, Category="Menu System")
154 bool bIsLAN = false;
155 UPROPERTY(BlueprintReadWrite, Category="Menu System")
156 bool bIsDedicatedServer = false;
157 UPROPERTY(BlueprintReadWrite, Category="Menu System")
158 bool bShouldAdvertise = false;
159 UPROPERTY(BlueprintReadWrite, Category="Menu System")
160 bool bUseLobbiesIfAvailable = false;
161 UPROPERTY(BlueprintReadWrite, Category="Menu System")
162 bool bUseLobbiesVoiceChatIfAvailable = false;
163 UPROPERTY(BlueprintReadWrite, Category="Menu System")
164 bool bUsesPresence = false;
165 UPROPERTY(BlueprintReadWrite, Category="Menu System")
166 bool bAllowJoinViaPresence = false;
167
168 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
169 class UPanelWidget* ServerList = nullptr;
170 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
171 class UButton* SearchServersButton = nullptr;
172
173 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
174 class UEditableTextBox* IPInputTextBox = nullptr;
175
176 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
177 class UEditableTextBox* ServerNameTextBox = nullptr;
178 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
179 class USlider* NumberOfPlayersSlider = nullptr;
180 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
181 class USlider* MinNumberOfPlayersSlider = nullptr;
182 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
183 class UTextBlock* NumberOfPlayersText = nullptr;
184 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
185 class UTextBlock* MinNumberOfPlayersText = nullptr;
186 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
187 class UCheckBox* DedicatedServerCheckbox = nullptr;
188 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
189 class UCheckBox* LANCheckbox = nullptr;
190 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
191 class UCheckBox* UsesPresenceCheckbox = nullptr;
192
193
194
195 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
196 class UTextBlock* DifficultyTextBlock = nullptr;
197
198 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
199 class UWidget* SearchingProgressSpinner = nullptr;
200
201
202 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
203 class USingleMenuSystemWidget* SignInScreenMenu = nullptr;
204 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
205 class USingleMenuSystemWidget* MainMenu = nullptr;
206 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
207 class USingleMenuSystemWidget* CampaignMenu = nullptr;
208 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
209 class USingleMenuSystemWidget* MultiplayerMenu = nullptr;
210 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
211 class USingleMenuSystemWidget* HordeMenu = nullptr;
212 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
213 class USingleMenuSystemWidget* CharacterMenu = nullptr;
214 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
215 class USingleMenuSystemWidget* BrowseMenu = nullptr;
216 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
217 class USingleMenuSystemWidget* HostMenu = nullptr;
218 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
219 class USingleMenuSystemWidget* QuickMatchMenu = nullptr;
220
221 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
222 class USingleMenuSystemWidget* PlaylistMenu = nullptr;
223
224private:
225
226 class IPlayFabMenu* PlayFabMenu = nullptr;
227
228 UFUNCTION()
229 void StartScreenButtonClicked();
230
231
232 TSubclassOf<class UUserWidget> ServerRowClass;
233 TSubclassOf<class UUserWidget> LevelSelectClass;
234
235 float NumberOfPlayers = 1;
236 float MinNumberOfPlayers = 1;
237
238 TOptional<uint32> SelectedIndex;
239
240 bool bCloseGame = false;
241
242
243 UFUNCTION()
244 void SignInScreenButtonSelected(const int32 Index);
245 UFUNCTION()
246 void MainMenuButtonSelected(const int32 Index);
247 UFUNCTION()
248 void CampaignMenuButtonSelected(const int32 Index);
249 UFUNCTION()
250 void MultiplayerMenuButtonSelected(const int32 Index);
251 UFUNCTION()
252 void HordeMenuButtonSelected(const int32 Index);
253 UFUNCTION()
254 void CharacterMenuButtonSelected(const int32 Index);
255 UFUNCTION()
256 void BrowseMenuButtonSelected(const int32 Index);
257 UFUNCTION()
258 void HostMenuButtonSelected(const int32 Index);
259 UFUNCTION()
260 void QuickMatchMenuButtonSelected(const int32 Index);
261 UFUNCTION()
262 void PlaylistMenuButtonSelected(const int32 Index);
263
264 UFUNCTION()
265 void CloseLevelSelect(const bool bOpenConfirm);
266 // FGameLevel SelectedGameLevel;
267
268 // UFUNCTION(BlueprintCallable, Category="Menu System")
269 // void ExitQuitConfirmationPopup(const int32 Index);
270
271
272};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
EGameplayMode
Definition MenuData.h:40
Definition PlayFabMenu.h:21
Definition LevelSelectionWidget.h:21
Definition MainMenuSystemWidget.h:11
Definition MenuSystemWidget.h:19
Definition SingleMenuSystemWidget.h:15