Compare commits
No commits in common. "4ff8d8eca31d10487842cedcdb2bc8a3b9aea476" and "6475e1e18320b5641af043555deba353b1d75972" have entirely different histories.
4ff8d8eca3
...
6475e1e183
BIN
Content/Player/BP_PlayerCharacter.uasset
(Stored with Git LFS)
BIN
Content/Player/BP_PlayerCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Weapons/MagicWand/BP_MagicWandProjectile.uasset
(Stored with Git LFS)
BIN
Content/Weapons/MagicWand/BP_MagicWandProjectile.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Widgets/MainMenu/BP_MainMenuWidget.uasset
(Stored with Git LFS)
BIN
Content/Widgets/MainMenu/BP_MainMenuWidget.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Widgets/MainMenu/BP_SelectWeaponWidget.uasset
(Stored with Git LFS)
BIN
Content/Widgets/MainMenu/BP_SelectWeaponWidget.uasset
(Stored with Git LFS)
Binary file not shown.
@ -24,10 +24,14 @@ public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, meta=(BindWidget))
|
||||
UListView* UpgradesListView;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TArray<TSubclassOf<UUpgradeButtonDataObject>> UpgradeItems;
|
||||
|
||||
virtual void NativeConstruct() override;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
UFUNCTION()
|
||||
void ResumeButtonClicked();
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "MainMenuWidget.h"
|
||||
|
||||
#include "SelectWeaponWidget.h"
|
||||
#include "Blueprint/WidgetBlueprintLibrary.h"
|
||||
#include "Components/Button.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
@ -36,8 +35,6 @@ void UMainMenuWidget::NativeConstruct()
|
||||
QuitButton->OnUnhovered.AddUniqueDynamic(this, &UMainMenuWidget::PlayUnhoveredSound);
|
||||
}
|
||||
|
||||
QuitButton->SetIsEnabled(false);
|
||||
|
||||
if (APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0))
|
||||
{
|
||||
UWidgetBlueprintLibrary::SetInputMode_UIOnlyEx(PlayerController, this, EMouseLockMode::LockAlways);
|
||||
@ -47,31 +44,18 @@ void UMainMenuWidget::NativeConstruct()
|
||||
|
||||
void UMainMenuWidget::NewGameButtonOnClicked()
|
||||
{
|
||||
if (NewGameMenuWidget)
|
||||
if (!NewGameLevel.IsNull())
|
||||
{
|
||||
RemoveFromParent();
|
||||
UGameplayStatics::OpenLevelBySoftObjectPtr(GetWorld(), NewGameLevel);
|
||||
}
|
||||
|
||||
UUserWidget* selectWeaponWidget = CreateWidget<UUserWidget, APlayerController*>(
|
||||
UGameplayStatics::GetPlayerController(GetWorld(), 0), NewGameMenuWidget);
|
||||
if (APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0))
|
||||
{
|
||||
PlayerController->bShowMouseCursor = false;
|
||||
UWidgetBlueprintLibrary::SetInputMode_GameOnly(PlayerController);
|
||||
}
|
||||
|
||||
if (selectWeaponWidget)
|
||||
{
|
||||
selectWeaponWidget->AddToViewport();
|
||||
}
|
||||
}
|
||||
|
||||
// if (!NewGameLevel.IsNull())
|
||||
// {
|
||||
// UGameplayStatics::OpenLevelBySoftObjectPtr(GetWorld(), NewGameLevel);
|
||||
// }
|
||||
//
|
||||
// if (APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0))
|
||||
// {
|
||||
// PlayerController->bShowMouseCursor = false;
|
||||
// UWidgetBlueprintLibrary::SetInputMode_GameOnly(PlayerController);
|
||||
// }
|
||||
//
|
||||
// SetIsFocusable(false);
|
||||
SetIsFocusable(false);
|
||||
}
|
||||
|
||||
void UMainMenuWidget::QuitButtonOnClicked()
|
||||
|
@ -1,34 +0,0 @@
|
||||
// Louis Hobbs | 2024-2025
|
||||
|
||||
|
||||
#include "SelectWeaponWidget.h"
|
||||
|
||||
#include "MainMenuWidget.h"
|
||||
#include "Components/Button.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
|
||||
void USelectWeaponWidget::NativeConstruct()
|
||||
{
|
||||
Super::NativeConstruct();
|
||||
|
||||
if (BackButton)
|
||||
{
|
||||
BackButton->OnClicked.AddUniqueDynamic(this, &USelectWeaponWidget::BackButtonClicked);
|
||||
}
|
||||
}
|
||||
|
||||
void USelectWeaponWidget::BackButtonClicked()
|
||||
{
|
||||
if (PreviousWidget)
|
||||
{
|
||||
RemoveFromParent();
|
||||
|
||||
UUserWidget* selectWeaponWidget = CreateWidget<UUserWidget, APlayerController*>(
|
||||
UGameplayStatics::GetPlayerController(GetWorld(), 0), PreviousWidget);
|
||||
|
||||
if (selectWeaponWidget)
|
||||
{
|
||||
selectWeaponWidget->AddToViewport();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
// Louis Hobbs | 2024-2025
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "VampireInteractiveWidget.h"
|
||||
#include "SelectWeaponWidget.generated.h"
|
||||
|
||||
|
||||
class UListView;
|
||||
class UButton;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class VAMPIRES_API USelectWeaponWidget : public UVampireInteractiveWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, meta=(BindWidget))
|
||||
UButton* BackButton;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, meta=(BindWidget))
|
||||
UListView* UpgradesListView;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||
TSubclassOf<class UUserWidget> PreviousWidget;
|
||||
|
||||
virtual void NativeConstruct() override;
|
||||
|
||||
private:
|
||||
|
||||
UFUNCTION()
|
||||
void BackButtonClicked();
|
||||
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user