Lots of little UI adjustments
This commit is contained in:
parent
83caa71a9e
commit
bd54f30507
BIN
Content/Levels/MainMenu/MainMenu.umap
(Stored with Git LFS)
BIN
Content/Levels/MainMenu/MainMenu.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Weapons/LightningRing/BP_LightningRingWeapon.uasset
(Stored with Git LFS)
BIN
Content/Weapons/LightningRing/BP_LightningRingWeapon.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Widgets/HUD/BP_HUDWidget.uasset
(Stored with Git LFS)
BIN
Content/Widgets/HUD/BP_HUDWidget.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Widgets/LevelUp/BP_UpgradeButtonTemplate.uasset
(Stored with Git LFS)
BIN
Content/Widgets/LevelUp/BP_UpgradeButtonTemplate.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Widgets/LevelUp/T_GoldIcon.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Widgets/LevelUp/T_GoldIcon.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Widgets/LevelUp/T_HealthIcon.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Widgets/LevelUp/T_HealthIcon.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Widgets/LevelUp/T_NewWeaponIcon.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Widgets/LevelUp/T_NewWeaponIcon.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Widgets/LevelUp/T_UpgradeIcon.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Widgets/LevelUp/T_UpgradeIcon.uasset
(Stored with Git LFS)
Normal file
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.
BIN
Content/Widgets/MainMenu/BP_StarterButtonWIdget.uasset
(Stored with Git LFS)
BIN
Content/Widgets/MainMenu/BP_StarterButtonWIdget.uasset
(Stored with Git LFS)
Binary file not shown.
@ -17,6 +17,13 @@ void USelectWeaponWidget::NativeConstruct()
|
||||
if (BackButton)
|
||||
{
|
||||
BackButton->OnClicked.AddUniqueDynamic(this, &USelectWeaponWidget::BackButtonClicked);
|
||||
BackButton->OnClicked.AddUniqueDynamic(this, &USelectWeaponWidget::PlayClickedSound);
|
||||
|
||||
BackButton->OnHovered.AddUniqueDynamic(this, &USelectWeaponWidget::PlayHoveredSound);
|
||||
BackButton->OnHovered.AddUniqueDynamic(this, &USelectWeaponWidget::BackButtonTextBlockHoveredDelegate);
|
||||
|
||||
BackButton->OnUnhovered.AddUniqueDynamic(this, &USelectWeaponWidget::BackButtonTextBlockUnhoveredDelegate);
|
||||
BackButton->OnUnhovered.AddUniqueDynamic(this, &USelectWeaponWidget::PlayUnhoveredSound);
|
||||
}
|
||||
|
||||
if (UpgradesListView)
|
||||
|
@ -20,10 +20,13 @@ class VAMPIRES_API USelectWeaponWidget : public UVampireInteractiveWidget
|
||||
public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, meta=(BindWidget))
|
||||
UButton* BackButton;
|
||||
TObjectPtr<UButton> BackButton;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, meta=(BindWidget))
|
||||
UListView* UpgradesListView;
|
||||
TObjectPtr<UTextBlock> BackTextBlock;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, meta=(BindWidget))
|
||||
TObjectPtr<UListView> UpgradesListView;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
TArray<TSubclassOf<AWeapon>> starterWeapons;
|
||||
@ -38,4 +41,9 @@ private:
|
||||
UFUNCTION()
|
||||
void BackButtonClicked();
|
||||
|
||||
UFUNCTION()
|
||||
void BackButtonTextBlockHoveredDelegate() { SetTextBlockHovered(BackTextBlock); }
|
||||
|
||||
UFUNCTION()
|
||||
void BackButtonTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(BackTextBlock); }
|
||||
};
|
||||
|
@ -31,6 +31,12 @@ void UStarterWeaponButtonWidget::NativeOnListItemObjectSet(UObject* ListItemObje
|
||||
if (Body)
|
||||
{
|
||||
Body->OnClicked.AddUniqueDynamic(this, &UStarterWeaponButtonWidget::OnClicked);
|
||||
|
||||
Body->OnHovered.AddUniqueDynamic(this, &UStarterWeaponButtonWidget::PlayHoveredSound);
|
||||
Body->OnHovered.AddUniqueDynamic(this, &UStarterWeaponButtonWidget::OnHoveredDelegate);
|
||||
|
||||
Body->OnUnhovered.AddUniqueDynamic(this, &UStarterWeaponButtonWidget::OnUnhoveredDelegate);
|
||||
Body->OnUnhovered.AddUniqueDynamic(this, &UStarterWeaponButtonWidget::PlayUnhoveredSound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "VampireInteractiveWidget.h"
|
||||
#include "Blueprint/IUserObjectListEntry.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include "StarterWeaponButtonWidget.generated.h"
|
||||
@ -15,7 +16,7 @@ class UButton;
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class VAMPIRES_API UStarterWeaponButtonWidget : public UUserWidget, public IUserObjectListEntry
|
||||
class VAMPIRES_API UStarterWeaponButtonWidget : public UVampireInteractiveWidget, public IUserObjectListEntry
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@ -46,4 +47,11 @@ protected:
|
||||
private:
|
||||
UFUNCTION()
|
||||
virtual void OnClicked();
|
||||
|
||||
UFUNCTION()
|
||||
void OnHoveredDelegate() { SetTextBlockHovered(WeaponNameTextBlock); SetTextBlockHovered(DescriptionTextBlock); }
|
||||
|
||||
UFUNCTION()
|
||||
void OnUnhoveredDelegate() { SetTextBlockUnhovered(WeaponNameTextBlock); SetTextBlockUnhovered(DescriptionTextBlock); }
|
||||
|
||||
};
|
||||
|
@ -53,6 +53,12 @@ void UUpgradeButtonWidget::NativeOnListItemObjectSet(UObject* ListItemObject)
|
||||
if (Body)
|
||||
{
|
||||
Body->OnClicked.AddUniqueDynamic(this, &UUpgradeButtonWidget::OnClicked);
|
||||
|
||||
Body->OnHovered.AddUniqueDynamic(this, &UUpgradeButtonWidget::PlayHoveredSound);
|
||||
Body->OnHovered.AddUniqueDynamic(this, &UUpgradeButtonWidget::OnHoveredDelegate);
|
||||
|
||||
Body->OnUnhovered.AddUniqueDynamic(this, &UUpgradeButtonWidget::OnUnhoveredDelegate);
|
||||
Body->OnUnhovered.AddUniqueDynamic(this, &UUpgradeButtonWidget::PlayUnhoveredSound);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "VampireInteractiveWidget.h"
|
||||
#include "Blueprint/IUserObjectListEntry.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include "UpgradeButtonWidget.generated.h"
|
||||
@ -26,7 +27,7 @@ class UButton;
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class VAMPIRES_API UUpgradeButtonWidget : public UUserWidget, public IUserObjectListEntry
|
||||
class VAMPIRES_API UUpgradeButtonWidget : public UVampireInteractiveWidget, public IUserObjectListEntry
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@ -79,4 +80,11 @@ protected:
|
||||
private:
|
||||
UFUNCTION()
|
||||
virtual void OnClicked();
|
||||
|
||||
UFUNCTION()
|
||||
void OnHoveredDelegate() { SetTextBlockHovered(WeaponNameTextBlock); SetTextBlockHovered(DescriptionTextBlock); }
|
||||
|
||||
UFUNCTION()
|
||||
void OnUnhoveredDelegate() { SetTextBlockUnhovered(WeaponNameTextBlock); SetTextBlockUnhovered(DescriptionTextBlock); }
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user