Created Pause Menu with WIP Tab Functionality
This commit is contained in:
parent
162d9c85a4
commit
958542ac69
@ -10,15 +10,10 @@
|
|||||||
<list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="">
|
<list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Input/IMC_Default.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Input/IMC_Default.uasset" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Content/Levels/MainMenuLevel.umap" beforeDir="false" afterPath="$PROJECT_DIR$/Content/Levels/MainMenuLevel.umap" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Particles/P_Ambient_Dust.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Particles/P_Ambient_Dust.uasset" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/BountyDirector.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/BountyDirector.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/EndlessVendettaCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/EndlessVendettaCharacter.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/EndlessVendettaCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/EndlessVendettaCharacter.h" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -134,7 +129,7 @@
|
|||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1706900339638</updated>
|
<updated>1706900339638</updated>
|
||||||
<workItem from="1706900342753" duration="2652000" />
|
<workItem from="1706900342753" duration="2652000" />
|
||||||
<workItem from="1706972179014" duration="2867000" />
|
<workItem from="1706972179014" duration="11096000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:792083b0481d20b15498d36fcd01b2d9c2432b02ad13ecd5c5b1f2a74e090c07
|
oid sha256:f1ecafab249f201ddeaf8e1c7b6631e183f9bf07d10e1f460002076e75795801
|
||||||
size 470474
|
size 470059
|
||||||
|
BIN
EndlessVendetta/Content/PauseMenu/PauseMenuBackground.png
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/PauseMenu/PauseMenuBackground.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/PauseMenu/PauseMenuBackground.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/PauseMenu/PauseMenuBackground.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
3
EndlessVendetta/Content/PauseMenu/WBP_PauseMenu.uasset
Normal file
3
EndlessVendetta/Content/PauseMenu/WBP_PauseMenu.uasset
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:336be313e00bf23335d5275ec65cc1c86bd7f339a66ef48608261e1aa503614f
|
||||||
|
size 475108
|
3
EndlessVendetta/Content/PauseMenu/WBP_TestMenuTab.uasset
Normal file
3
EndlessVendetta/Content/PauseMenu/WBP_TestMenuTab.uasset
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9cf9c231c4b94dec2434c03af547e75968039b3ab03ce0e9d4518c94a86b1fa9
|
||||||
|
size 32656
|
BIN
EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
(Stored with Git LFS)
Binary file not shown.
@ -76,8 +76,18 @@ void ABountyHunterCharacter::TogglePauseMenu()
|
|||||||
PC->SetIgnoreMoveInput(bOpenNewPauseMenu);
|
PC->SetIgnoreMoveInput(bOpenNewPauseMenu);
|
||||||
PC->SetIgnoreLookInput(bOpenNewPauseMenu);
|
PC->SetIgnoreLookInput(bOpenNewPauseMenu);
|
||||||
PC->SetShowMouseCursor(bOpenNewPauseMenu);
|
PC->SetShowMouseCursor(bOpenNewPauseMenu);
|
||||||
PauseMenu = bOpenNewPauseMenu ? CreateWidget<UPauseMenuClass>(GetWorld(), PauseMenuWidgetClass) : nullptr;
|
if (bOpenNewPauseMenu)
|
||||||
if (bOpenNewPauseMenu) PauseMenu->AddToViewport(50);
|
{
|
||||||
|
PauseMenu = CreateWidget<UPauseMenuClass>(GetWorld(), PauseMenuWidgetClass);
|
||||||
|
PauseMenu->AddToViewport(50);
|
||||||
|
BountiesTab = CreateWidget(GetWorld(), BountyTabWidgetClass);
|
||||||
|
PauseMenu->OpenNewTab(BountiesTab);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PauseMenu->RemoveFromParent();
|
||||||
|
PauseMenu = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ABountyHunterCharacter::Tick(float DeltaTime)
|
void ABountyHunterCharacter::Tick(float DeltaTime)
|
||||||
|
@ -33,15 +33,24 @@ class ENDLESSVENDETTA_API ABountyHunterCharacter : public AEndlessVendettaCharac
|
|||||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty Hunter")
|
UPROPERTY(EditDefaultsOnly, Category = "Bounty Hunter")
|
||||||
FString OpenWorldLevelName = "ControlTutorialLevel";
|
FString OpenWorldLevelName = "ControlTutorialLevel";
|
||||||
|
|
||||||
|
// Input Action for Opening and Closing Pause Menu
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
||||||
UInputAction* PauseMenuAction;
|
UInputAction* PauseMenuAction;
|
||||||
|
|
||||||
|
// Widget Class used to Spawn Pause Menu
|
||||||
UPROPERTY(EditDefaultsOnly, Category = PauseMenu)
|
UPROPERTY(EditDefaultsOnly, Category = PauseMenu)
|
||||||
TSubclassOf<UPauseMenuClass> PauseMenuWidgetClass;
|
TSubclassOf<UPauseMenuClass> PauseMenuWidgetClass;
|
||||||
|
|
||||||
|
// Reference to Pause Menu Widget
|
||||||
UPauseMenuClass* PauseMenu;
|
UPauseMenuClass* PauseMenu;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// Widget Class used to Spawn Bounties Tab Widget
|
||||||
|
UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
|
||||||
|
TSubclassOf<UUserWidget> BountyTabWidgetClass;
|
||||||
|
|
||||||
|
// Reference to Bounty Tab Widget
|
||||||
|
UUserWidget* BountiesTab;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -64,6 +73,7 @@ protected:
|
|||||||
// Overridden to Setup up Pause Menu Inputs
|
// Overridden to Setup up Pause Menu Inputs
|
||||||
virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;
|
virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;
|
||||||
|
|
||||||
|
// Open or Close the Pause Menu, Defaults to Opening Bounty Tab
|
||||||
void TogglePauseMenu();
|
void TogglePauseMenu();
|
||||||
|
|
||||||
// Called every frame
|
// Called every frame
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "PauseMenuClass.h"
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Blueprint/UserWidget.h"
|
||||||
|
#include "PauseMenuClass.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class ENDLESSVENDETTA_API UPauseMenuClass : public UUserWidget
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
// ------------------- ATTRIBUTES ------------------------------
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// ------------------- METHODS ---------------------------------
|
||||||
|
private:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
public:
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void OpenNewTab(UUserWidget* TabWidget);
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user