Space Plunder
Loading...
Searching...
No Matches
MenuSystemGameInstance.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 "Engine/GameInstance.h"
8// #include "Interfaces/MenuSystem.h"
9#include "Interfaces/OnlineSessionInterface.h"
10#include "OnlineSessionSettings.h"
11#include "MenuSystemGameInstance.generated.h"
12
13UCLASS()
15{
16 GENERATED_BODY()
17public:
18 UMenuSystemGameInstance(const FObjectInitializer & ObjectInitializer);
19
20 virtual void Init() override;
21
22 virtual void LoadMenu() override;
23 virtual void LaunchInGameMenu(APlayerController* Player, bool bOpen) override;
24
25 virtual void Host(FOnlineSessionSettings HostSessionSettings) override;
26 virtual void SinglePlayer() override;
27 virtual void Character() override;
28 virtual void Options() override;
29 virtual void StartSession() override;
30
31 virtual int32 GetCurrentSaveSlot() override{return 1;};
32
33
34 UFUNCTION(Exec)
35 virtual void JoinManualAddress(const FString& IpAddress) override;
36
37 UFUNCTION(Exec)
38 virtual void Join(uint32 Index) override;
39
40
41 UFUNCTION(BlueprintCallable, Exec, Category="Menu System")
42 virtual void SearchServers() override;
43 UFUNCTION(BlueprintCallable, Exec, Category="Menu System")
44 virtual void Quit(APlayerController* Player) override;
45
46 //? Temp from other project
47 UFUNCTION(BlueprintCallable, Exec, Category="Menu System")
48 void JoinFirstPossibleMatch();
49 UFUNCTION(BlueprintCallable, Exec, Category="Menu System")
50 void SessionFoundComplete(bool bSuccess);
51 void OnJoinSessionCompleted(FName SessionName, EOnJoinSessionCompleteResult::Type Result);
52
53 // UFUNCTION(BlueprintCallable, Category="Menu System")
54 // FName GetCurrentSessionName();
55
56 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Menu System")
57 FString StartingLevel = "/Game/Demos/ShooterDemo/Levels/ShooterDemoLevel?listen";
58
59 // TODO will inherit these from EpicOnline
60 //- new 5.1 functions //
61 // virtual void LoginToEpicOnline(FString ID = "", FString Token = "", FString LoginType = "accountportal") override;
62 // virtual FString GetPlayerUserName() override;
63 // virtual bool GetIsPlayerLoggedIn() override;
64 // virtual FName GetCurrentSessionName() override;
65 // virtual void CreateEOSSession(FName SessionName,bool bIsDedicatedServer, bool bIsLAN, bool bIsPresence, int32 MaxNumPlayers) override;
66 // virtual void FindSessionAndJoin() override;
67 // virtual void DestroySession() override;
68
69protected:
70
71private:
72 // TSubclassOf<class UUserWidget> MenuClass;
73 // TSubclassOf<class UUserWidget> OptionsMenuClass;
74 // TSubclassOf<class UUserWidget> InGameMenuClass;
75
76 // IOnlineSessionPtr SessionInterface;
77 // TSharedPtr<class FOnlineSessionSearch> SessionSearch;
78 // FOnlineSessionSettings SessionSettings;
79
80 // UPROPERTY()
81 // class UMenuSystemWidget* MainMenu;
82 // UPROPERTY()
83 // class UOptionsMenuSystemWidget* OptionsMenu;
84
85
86 void OnCreateSessionComplete(FName SessionName, bool bSuccess);
87 void OnDestroySessionComplete(FName SessionName, bool bSuccess);
88 void OnFindSessionsComplete(bool bSuccess);
89 void OnJoinSessionComplete(FName SessionName, EOnJoinSessionCompleteResult::Type JoinResult);
90 // void OnNetworkFailure(UWorld* World, UNetDriver* NewDriver, ENetworkFailure::Type FailureType, const FString& ErrorString);
91
92 void CreateSession();
93
94 // FName CurrentSessionName;
95
96};
97
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition EpicOnlineGameInstance.h:43
Definition MenuSystemGameInstance.h:15
virtual int32 GetCurrentSaveSlot() override
Definition MenuSystemGameInstance.h:31