Update Pause Menu UI for Updated Layout

This commit is contained in:
Philip W 2024-05-12 14:42:24 +01:00
parent 729347c48b
commit 076a14c72a
3 changed files with 10 additions and 9 deletions

Binary file not shown.

View File

@ -143,7 +143,7 @@ void ABountyHunterCharacter::BeginPlay()
} }
} }
} }
CreatePauseMenuTabs(); //CreatePauseMenuTabs();
} }
void ABountyHunterCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) void ABountyHunterCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
@ -218,12 +218,12 @@ void ABountyHunterCharacter::TogglePauseMenu()
PauseMenu = CreateWidget<UPauseMenuClass>(GetWorld(), PauseMenuWidgetClass, FName("PauseMenu")); PauseMenu = CreateWidget<UPauseMenuClass>(GetWorld(), PauseMenuWidgetClass, FName("PauseMenu"));
PauseMenu->UpdatePlayerStatistics(Money, Favours); PauseMenu->UpdatePlayerStatistics(Money, Favours);
PauseMenu->AddToViewport(50); PauseMenu->AddToViewport(50);
PauseMenu->OpenNewTab(BountiesTab); // PauseMenu->OpenNewTab(BountiesTab);
PauseMenu->OpenedBountiesTab.AddDynamic(this, &ABountyHunterCharacter::OpenBountiesTab); // PauseMenu->OpenedBountiesTab.AddDynamic(this, &ABountyHunterCharacter::OpenBountiesTab);
PauseMenu->OpenedFavoursTab.AddDynamic(this, &ABountyHunterCharacter::OpenFavoursTab); // PauseMenu->OpenedFavoursTab.AddDynamic(this, &ABountyHunterCharacter::OpenFavoursTab);
PauseMenu->OpenedNavigationTab.AddDynamic(this, &ABountyHunterCharacter::OpenNavigationTab); // PauseMenu->OpenedNavigationTab.AddDynamic(this, &ABountyHunterCharacter::OpenNavigationTab);
PauseMenu->OpenedSettingsTab.AddDynamic(this, &ABountyHunterCharacter::OpenSettingsTab); // PauseMenu->OpenedSettingsTab.AddDynamic(this, &ABountyHunterCharacter::OpenSettingsTab);
PauseMenu->OpenedQuitTab.AddDynamic(this, &ABountyHunterCharacter::OpenQuitTab); // PauseMenu->OpenedQuitTab.AddDynamic(this, &ABountyHunterCharacter::OpenQuitTab);
PauseMenu->SetVisibility(ESlateVisibility::Visible); PauseMenu->SetVisibility(ESlateVisibility::Visible);
PauseMenu->SetFocus(); PauseMenu->SetFocus();
} }

View File

@ -220,6 +220,7 @@ private:
void CreatePauseMenuTabs(); void CreatePauseMenuTabs();
// Open or Close the Pause Menu, Defaults to Opening Bounty Tab // Open or Close the Pause Menu, Defaults to Opening Bounty Tab
UFUNCTION(BlueprintCallable)
void TogglePauseMenu(); void TogglePauseMenu();
// Opens Bounties Tab // Opens Bounties Tab