diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml
index 4484ab9d..032408b5 100644
--- a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml
+++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml
@@ -9,6 +9,14 @@
+
+
+
+
+
+
+
+
@@ -126,7 +134,7 @@
-
+
diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
index 381bde7b..5c690b7f 100644
--- a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
+++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f1ecafab249f201ddeaf8e1c7b6631e183f9bf07d10e1f460002076e75795801
-size 470059
+oid sha256:d2f8d95778a3400a1cb4f254ce88e826577c5600bacca7246b34c0a3f10ee51d
+size 472419
diff --git a/EndlessVendetta/Content/Levels/MainMenuLevel.umap b/EndlessVendetta/Content/Levels/MainMenuLevel.umap
index 5e1dba7b..4fb787ef 100644
--- a/EndlessVendetta/Content/Levels/MainMenuLevel.umap
+++ b/EndlessVendetta/Content/Levels/MainMenuLevel.umap
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:fec34acd70ac06d25aa1c86c425bb023665ec2ea756ee7f676ef0ee5749d6e6c
-size 308710
+oid sha256:62323ec29b4a5d647b91a836041fb29cbac98efc420ff43db000bf63ba74e92d
+size 308758
diff --git a/EndlessVendetta/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset b/EndlessVendetta/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset
new file mode 100644
index 00000000..425b5d7f
--- /dev/null
+++ b/EndlessVendetta/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:51dce130f9a950a96cc11a6d0ce5c7da112f49d961edb944ec9cf866a00b46a2
+size 25564
diff --git a/EndlessVendetta/Content/PauseMenu/Tabs/WBP_QuitTab.uasset b/EndlessVendetta/Content/PauseMenu/Tabs/WBP_QuitTab.uasset
new file mode 100644
index 00000000..e3cc3d00
--- /dev/null
+++ b/EndlessVendetta/Content/PauseMenu/Tabs/WBP_QuitTab.uasset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:47dd758ba4393d88bf5ef5f4851b8419af7eac51b969e91cfd6f383abd2876fa
+size 42508
diff --git a/EndlessVendetta/Content/PauseMenu/Tabs/WBP_TestMenuTab.uasset b/EndlessVendetta/Content/PauseMenu/Tabs/WBP_TestMenuTab.uasset
new file mode 100644
index 00000000..36ed479f
--- /dev/null
+++ b/EndlessVendetta/Content/PauseMenu/Tabs/WBP_TestMenuTab.uasset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:07291b58ab52dce6a6681c9f7e051f0f49e911be6cb555a59e4367f212d6d4f5
+size 33171
diff --git a/EndlessVendetta/Content/PauseMenu/WBP_PauseMenu.uasset b/EndlessVendetta/Content/PauseMenu/WBP_PauseMenu.uasset
index 6f9bc650..74180af7 100644
--- a/EndlessVendetta/Content/PauseMenu/WBP_PauseMenu.uasset
+++ b/EndlessVendetta/Content/PauseMenu/WBP_PauseMenu.uasset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:336be313e00bf23335d5275ec65cc1c86bd7f339a66ef48608261e1aa503614f
-size 475108
+oid sha256:6da7938ededede015f593c24d848d94faca0e6fa502cf28e3ec3a57fb3627c58
+size 485775
diff --git a/EndlessVendetta/Content/PauseMenu/WBP_TestMenuTab.uasset b/EndlessVendetta/Content/PauseMenu/WBP_TestMenuTab.uasset
deleted file mode 100644
index 3447b252..00000000
--- a/EndlessVendetta/Content/PauseMenu/WBP_TestMenuTab.uasset
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9cf9c231c4b94dec2434c03af547e75968039b3ab03ce0e9d4518c94a86b1fa9
-size 32656
diff --git a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
index c2a34afc..8d5fd2ab 100644
--- a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
+++ b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4c0ecf0ac0702cc2bd355ec050232a61c49e10f102448efbeb735a51824adef6
-size 14948
+oid sha256:15b6c3125fb9ab79ce42ea8e167f65e403524724da7a232719d682eccdf85d6e
+size 14831
diff --git a/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset b/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset
index cebb89f6..bf2e4391 100644
--- a/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset
+++ b/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:01d418b7b5593c6be29fb97bc899990ef08bac110c874363bad529b39a3af997
-size 53268
+oid sha256:01ef616c7a8bd90cd1b7a13efb18a56f33346efbae51efa31f09804478b7621d
+size 43456
diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp
index 5df9d76b..d6363f4b 100644
--- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp
+++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp
@@ -60,6 +60,7 @@ void ABountyHunterCharacter::BeginPlay()
Cast(GetController())->SetControlRotation(GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave.GetRotation().Rotator());
}
}
+ CreatePauseMenuTabs();
Super::BeginPlay();
}
@@ -75,28 +76,6 @@ void ABountyHunterCharacter::SetupPlayerInputComponent(UInputComponent* PlayerIn
Super::SetupPlayerInputComponent(PlayerInputComponent);
}
-void ABountyHunterCharacter::TogglePauseMenu()
-{
- const bool bOpenNewPauseMenu = !IsValid(PauseMenu);
- FInputModeUIOnly UIOnly;
- FInputModeGameOnly GameOnly;
- APlayerController* PC = Cast(GetController());
-
- InPauseMenu = bOpenNewPauseMenu;
- PC->SetIgnoreMoveInput(bOpenNewPauseMenu);
- PC->SetIgnoreLookInput(bOpenNewPauseMenu);
- PC->SetShowMouseCursor(bOpenNewPauseMenu);
- if (!bOpenNewPauseMenu)
- {
- PauseMenu->RemoveFromParent();
- PauseMenu = nullptr;
- }
- PauseMenu = CreateWidget(GetWorld(), PauseMenuWidgetClass);
- PauseMenu->AddToViewport(50);
- BountiesTab = CreateWidget(GetWorld(), BountyTabWidgetClass);
- PauseMenu->OpenNewTab(BountiesTab);
-}
-
void ABountyHunterCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
Super::EndPlay(EndPlayReason);
@@ -124,3 +103,39 @@ void ABountyHunterCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason)
GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave = ClosestLandingZone->GetExitTransform();
UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0);
}
+
+void ABountyHunterCharacter::CreatePauseMenuTabs()
+{
+ BountiesTab = CreateWidget(GetWorld(), BountyTabWidgetClass);
+ FavoursTab = CreateWidget(GetWorld(), FavoursTabWidgetClass);
+ NavigationTab = CreateWidget(GetWorld(), NavigationTabWidgetClass);
+ SettingsTab = CreateWidget(GetWorld(), SettingsTabWidgetClass);
+ QuitTab = CreateWidget(GetWorld(), QuitTabWidgetClass);
+}
+
+void ABountyHunterCharacter::TogglePauseMenu()
+{
+ const bool bOpenNewPauseMenu = !IsValid(PauseMenu);
+ FInputModeUIOnly UIOnly;
+ FInputModeGameOnly GameOnly;
+ APlayerController* PC = Cast(GetController());
+
+ InPauseMenu = bOpenNewPauseMenu;
+ PC->SetIgnoreMoveInput(bOpenNewPauseMenu);
+ PC->SetIgnoreLookInput(bOpenNewPauseMenu);
+ PC->SetShowMouseCursor(bOpenNewPauseMenu);
+ if (!bOpenNewPauseMenu)
+ {
+ PauseMenu->RemoveFromParent();
+ PauseMenu = nullptr;
+ return;
+ }
+ PauseMenu = CreateWidget(GetWorld(), PauseMenuWidgetClass);
+ PauseMenu->AddToViewport(50);
+ PauseMenu->OpenNewTab(BountiesTab);
+ PauseMenu->OpenedBountiesTab.AddDynamic(this, &ABountyHunterCharacter::OpenBountiesTab);
+ PauseMenu->OpenedFavoursTab.AddDynamic(this, &ABountyHunterCharacter::OpenFavoursTab);
+ PauseMenu->OpenedNavigationTab.AddDynamic(this, &ABountyHunterCharacter::OpenNavigationTab);
+ PauseMenu->OpenedSettingsTab.AddDynamic(this, &ABountyHunterCharacter::OpenSettingsTab);
+ PauseMenu->OpenedQuitTab.AddDynamic(this, &ABountyHunterCharacter::OpenQuitTab);
+}
\ No newline at end of file
diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h
index 2db3f625..50695cba 100644
--- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h
+++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h
@@ -7,7 +7,9 @@
#include "EndlessVendetta/EVGameInstance.h"
#include "EndlessVendetta/MainSaveGameClass.h"
#include "EndlessVendetta/BountySystem/MainBountyClass.h"
+#include "EndlessVendetta/PauseMenu/BountiesTab.h"
#include "EndlessVendetta/PauseMenu/PauseMenuClass.h"
+#include "EndlessVendetta/PauseMenu/QuitTab.h"
#include "BountyHunterCharacter.generated.h"
/**
@@ -33,25 +35,7 @@ class ENDLESSVENDETTA_API ABountyHunterCharacter : public AEndlessVendettaCharac
UPROPERTY(EditDefaultsOnly, Category = "Bounty Hunter")
FString OpenWorldLevelName = "ControlTutorialLevel";
- // Input Action for Opening and Closing Pause Menu
- UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
- UInputAction* PauseMenuAction;
-
- // Widget Class used to Spawn Pause Menu
- UPROPERTY(EditDefaultsOnly, Category = PauseMenu)
- TSubclassOf PauseMenuWidgetClass;
-
- // Reference to Pause Menu Widget
- UPauseMenuClass* PauseMenu;
-
-protected:
- // Widget Class used to Spawn Bounties Tab Widget
- UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
- TSubclassOf BountyTabWidgetClass;
-
- // Reference to Bounty Tab Widget
- UUserWidget* BountiesTab;
-
+protected:
public:
@@ -65,24 +49,115 @@ private:
// Replaces Normal Bounty Info UI with Unique Game Over UI
void AllBountiesCompleted();
-
+
protected:
// Called When Player Spawns
virtual void BeginPlay() override;
// Overridden to Setup up Pause Menu Inputs
virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;
-
- // Open or Close the Pause Menu, Defaults to Opening Bounty Tab
- void TogglePauseMenu();
-
+
// Called When Actor destroyed or Removed from Level
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
+
public:
// Used by Final Checkpoint to always load the Level set as the Open Level in here
FString GetOpenWorldLevelName()
{
return OpenWorldLevelName;
}
+
+// ------------------- Pause Menu ---------------------------------
+private:
+ // Input Action for Opening and Closing Pause Menu
+ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
+ UInputAction* PauseMenuAction;
+
+ // Widget Class used to Spawn Pause Menu
+ UPROPERTY(EditDefaultsOnly, Category = PauseMenu)
+ TSubclassOf PauseMenuWidgetClass;
+
+ // Reference to Pause Menu Widget
+ UPauseMenuClass* PauseMenu;
+ // Widget Class used to Spawn Bounties Tab Widget
+ UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
+ TSubclassOf BountyTabWidgetClass;
+
+ // Reference to Bounty Tab Widget
+ UPROPERTY()
+ UBountiesTab* BountiesTab;
+
+ // Widget Class used to Spawn Favours Tab Widget
+ UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
+ TSubclassOf FavoursTabWidgetClass;
+
+ // Reference to Favours Tab Widget
+ UPROPERTY()
+ UTabWidget* FavoursTab;
+
+ // Widget Class used to Spawn Navigation Tab Widget
+ UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
+ TSubclassOf NavigationTabWidgetClass;
+
+ // Reference to Navigation Tab Widget
+ UPROPERTY()
+ UTabWidget* NavigationTab;
+
+ // Widget Class used to Spawn Settings Tab Widget
+ UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
+ TSubclassOf SettingsTabWidgetClass;
+
+ // Reference to Settings Tab Widget
+ UPROPERTY()
+ UTabWidget* SettingsTab;
+
+ // Widget Class used to Spawn Quit Tab Widget
+ UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
+ TSubclassOf QuitTabWidgetClass;
+
+ // Reference to Quit Tab Widget
+ UPROPERTY()
+ UQuitTab* QuitTab;
+
+ // Creates and Stores References to each Pause Menu Tab on Begin Play
+ void CreatePauseMenuTabs();
+
+ // Open or Close the Pause Menu, Defaults to Opening Bounty Tab
+ void TogglePauseMenu();
+
+ // Opens Bounties Tab
+ UFUNCTION()
+ void OpenBountiesTab()
+ {
+ PauseMenu->OpenNewTab(BountiesTab);
+ }
+
+ // Opens Favours Tab
+ UFUNCTION()
+ void OpenFavoursTab()
+ {
+ PauseMenu->OpenNewTab(FavoursTab);
+ }
+
+ // Opens Navigation Tab
+ UFUNCTION()
+ void OpenNavigationTab()
+ {
+ PauseMenu->OpenNewTab(NavigationTab);
+ }
+
+ // Opens Settings Tab
+ UFUNCTION()
+ void OpenSettingsTab()
+ {
+ PauseMenu->OpenNewTab(SettingsTab);
+ }
+
+ // Opens Quit Tab
+ UFUNCTION()
+ void OpenQuitTab()
+ {
+ PauseMenu->OpenNewTab(QuitTab);
+ }
};
diff --git a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.cpp b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.cpp
new file mode 100644
index 00000000..0400a586
--- /dev/null
+++ b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.cpp
@@ -0,0 +1,5 @@
+// Fill out your copyright notice in the Description page of Project Settings.
+
+
+#include "BountiesTab.h"
+
diff --git a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.h b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.h
new file mode 100644
index 00000000..85878167
--- /dev/null
+++ b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.h
@@ -0,0 +1,31 @@
+// Fill out your copyright notice in the Description page of Project Settings.
+
+#pragma once
+
+#include "CoreMinimal.h"
+#include "TabWidget.h"
+#include "EndlessVendetta/BountySystem/BountyClass.h"
+#include "BountiesTab.generated.h"
+
+DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FTrackBounty, ABountyClass*, BountyToTrack);
+
+UCLASS()
+class ENDLESSVENDETTA_API UBountiesTab : public UTabWidget
+{
+ GENERATED_BODY()
+
+// ------------------- ATTRIBUTES ------------------------------
+
+protected:
+
+public:
+ UPROPERTY(BlueprintAssignable)
+ FTrackBounty TrackBountyDelegate;
+
+// ------------------- METHODS ---------------------------------
+private:
+
+protected:
+
+public:
+};
diff --git a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/PauseMenuClass.h b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/PauseMenuClass.h
index 84acbe79..fff8ea82 100644
--- a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/PauseMenuClass.h
+++ b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/PauseMenuClass.h
@@ -6,26 +6,36 @@
#include "Blueprint/UserWidget.h"
#include "PauseMenuClass.generated.h"
-/**
- *
- */
+DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOpenedBountiesTab);
+DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOpenedFavoursTab);
+DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOpenedNavigationTab);
+DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOpenedSettingsTab);
+DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOpenedQuitTab);
+
UCLASS()
class ENDLESSVENDETTA_API UPauseMenuClass : public UUserWidget
{
GENERATED_BODY()
// ------------------- ATTRIBUTES ------------------------------
+public:
+ UPROPERTY(BlueprintCallable)
+ FOpenedBountiesTab OpenedBountiesTab;
-protected:
+ UPROPERTY(BlueprintCallable)
+ FOpenedFavoursTab OpenedFavoursTab;
-public:
+ UPROPERTY(BlueprintCallable)
+ FOpenedNavigationTab OpenedNavigationTab;
+
+ UPROPERTY(BlueprintCallable)
+ FOpenedSettingsTab OpenedSettingsTab;
+
+ UPROPERTY(BlueprintCallable)
+ FOpenedQuitTab OpenedQuitTab;
// ------------------- METHODS ---------------------------------
-private:
-
-protected:
-
public:
+ // Closes any Previously Opened Tab and Opens the Given new Tab
UFUNCTION(BlueprintImplementableEvent)
- void OpenNewTab(UUserWidget* TabWidget);
-
+ void OpenNewTab(UTabWidget* TabWidget);
};
diff --git a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/QuitTab.cpp b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/QuitTab.cpp
new file mode 100644
index 00000000..d497a801
--- /dev/null
+++ b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/QuitTab.cpp
@@ -0,0 +1,5 @@
+// Fill out your copyright notice in the Description page of Project Settings.
+
+
+#include "QuitTab.h"
+
diff --git a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/QuitTab.h b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/QuitTab.h
new file mode 100644
index 00000000..cf9e4020
--- /dev/null
+++ b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/QuitTab.h
@@ -0,0 +1,14 @@
+// Fill out your copyright notice in the Description page of Project Settings.
+
+#pragma once
+
+#include "CoreMinimal.h"
+#include "TabWidget.h"
+#include "QuitTab.generated.h"
+
+UCLASS()
+class ENDLESSVENDETTA_API UQuitTab : public UTabWidget
+{
+ GENERATED_BODY()
+
+};
diff --git a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/TabWidget.cpp b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/TabWidget.cpp
new file mode 100644
index 00000000..bd9ccfba
--- /dev/null
+++ b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/TabWidget.cpp
@@ -0,0 +1,5 @@
+// Fill out your copyright notice in the Description page of Project Settings.
+
+
+#include "TabWidget.h"
+
diff --git a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/TabWidget.h b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/TabWidget.h
new file mode 100644
index 00000000..b96c7767
--- /dev/null
+++ b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/TabWidget.h
@@ -0,0 +1,17 @@
+// Fill out your copyright notice in the Description page of Project Settings.
+
+#pragma once
+
+#include "CoreMinimal.h"
+#include "Blueprint/UserWidget.h"
+#include "TabWidget.generated.h"
+
+/**
+ *
+ */
+UCLASS()
+class ENDLESSVENDETTA_API UTabWidget : public UUserWidget
+{
+ GENERATED_BODY()
+
+};