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)
@ -218,12 +218,12 @@ void ABountyHunterCharacter::TogglePauseMenu()
PauseMenu = CreateWidget<UPauseMenuClass>(GetWorld(), PauseMenuWidgetClass, FName("PauseMenu"));
PauseMenu->UpdatePlayerStatistics(Money, Favours);
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);
// 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);
PauseMenu->SetVisibility(ESlateVisibility::Visible);
PauseMenu->SetFocus();
}

View File

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