Finalize rework of UI, and lay groundwork for new UI pipeline
This commit is contained in:
Binary file not shown.
BIN
Content/ST_CommonWords.uasset
LFS
BIN
Content/ST_CommonWords.uasset
LFS
Binary file not shown.
BIN
Content/ST_WordsForUI.uasset
LFS
BIN
Content/ST_WordsForUI.uasset
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/UI/MainUI.uasset
LFS
BIN
Content/UI/MainUI.uasset
LFS
Binary file not shown.
Binary file not shown.
BIN
Content/UI/Modules/ActionInputs/WBP_ScreenActionInputs.uasset
LFS
Normal file
BIN
Content/UI/Modules/ActionInputs/WBP_ScreenActionInputs.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/UI/Styles/MI_BottomTopGradient.uasset
LFS
Normal file
BIN
Content/UI/Styles/MI_BottomTopGradient.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/UI/W_TestButton.uasset
LFS
BIN
Content/UI/W_TestButton.uasset
LFS
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,6 @@
|
|||||||
"UMG",
|
"UMG",
|
||||||
"Foliage",
|
"Foliage",
|
||||||
"PaperZD",
|
"PaperZD",
|
||||||
"CommonUI",
|
|
||||||
"AIModule",
|
"AIModule",
|
||||||
"DeveloperSettings",
|
"DeveloperSettings",
|
||||||
"Slate",
|
"Slate",
|
||||||
@@ -61,10 +60,6 @@
|
|||||||
"Name": "Volumetrics",
|
"Name": "Volumetrics",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Name": "CommonUI",
|
|
||||||
"Enabled": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Name": "ImpostorBaker",
|
"Name": "ImpostorBaker",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include "EleriPlayerController.h"
|
#include "EleriPlayerController.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
#include "ProjectEleri/System/MainBlueprintFunctionLibrary.h"
|
||||||
|
#include "ProjectEleri/UI/Helpers/ScreenActionInputDisplay.h"
|
||||||
|
|
||||||
void UEleriBaseWidget::ToggleWidget_Implementation(bool bActive) {
|
void UEleriBaseWidget::ToggleWidget_Implementation(bool bActive) {
|
||||||
SetVisibility(bActive? ESlateVisibility::Visible : ESlateVisibility::Hidden);
|
SetVisibility(bActive? ESlateVisibility::Visible : ESlateVisibility::Hidden);
|
||||||
@@ -20,3 +22,13 @@ void UEleriBaseWidget::HandleUiInputAction_Implementation(EEleriUIInputAction In
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UEleriBaseWidget::DisplayInputPrompts(const FName PromptMapKey)
|
||||||
|
{
|
||||||
|
if (auto PromptMapValue = InputDataMap.Find(PromptMapKey))
|
||||||
|
{
|
||||||
|
UMainGameWidget* MainGameWidget = UMainBlueprintFunctionLibrary::GetMainGameWidget(this);
|
||||||
|
MainGameWidget->GetScreenActionInputDisplayWidget()->SetVisibility(ESlateVisibility::Visible);
|
||||||
|
MainGameWidget->GetScreenActionInputDisplayWidget()->DisplayScreenActionInputs(PromptMapValue->List);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "UI/AlchemyWidget.h"
|
#include "UI/AlchemyWidget.h"
|
||||||
#include "ProjectEleri/UI/CalendarScreen.h"
|
#include "ProjectEleri/UI/CalendarScreen.h"
|
||||||
#include "ProjectEleri/DialogueSystem/DialogueWidget.h"
|
#include "ProjectEleri/DialogueSystem/DialogueWidget.h"
|
||||||
|
#include "ProjectEleri/UI/Helpers/ScreenActionInputDisplay.h"
|
||||||
|
|
||||||
void UMainGameWidget::TogglePlaceableUI(bool bEnabled)
|
void UMainGameWidget::TogglePlaceableUI(bool bEnabled)
|
||||||
{
|
{
|
||||||
@@ -34,6 +35,11 @@ void UMainGameWidget::OpenWidget(UEleriBaseWidget* Widget)
|
|||||||
Widget->ToggleWidget(true);
|
Widget->ToggleWidget(true);
|
||||||
WidgetStack.AddUnique(Widget);
|
WidgetStack.AddUnique(Widget);
|
||||||
CheckOpenWidgets();
|
CheckOpenWidgets();
|
||||||
|
|
||||||
|
if (Widget->bShowInputMapsWhileOnScreen)
|
||||||
|
{
|
||||||
|
Widget->DisplayInputPrompts();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMainGameWidget::CloseWidget(UEleriBaseWidget* Widget)
|
void UMainGameWidget::CloseWidget(UEleriBaseWidget* Widget)
|
||||||
@@ -43,6 +49,20 @@ void UMainGameWidget::CloseWidget(UEleriBaseWidget* Widget)
|
|||||||
Widget->ToggleWidget(false);
|
Widget->ToggleWidget(false);
|
||||||
WidgetStack.Remove(Widget);
|
WidgetStack.Remove(Widget);
|
||||||
CheckOpenWidgets();
|
CheckOpenWidgets();
|
||||||
|
|
||||||
|
bool bShouldShowInputPrompts = false;
|
||||||
|
for (UEleriBaseWidget* WidgetInStack : WidgetStack)
|
||||||
|
{
|
||||||
|
if (WidgetInStack->bShowInputMapsWhileOnScreen)
|
||||||
|
{
|
||||||
|
WidgetInStack->DisplayInputPrompts();
|
||||||
|
bShouldShowInputPrompts = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!bShouldShowInputPrompts)
|
||||||
|
{
|
||||||
|
GetScreenActionInputDisplayWidget()->SetVisibility(ESlateVisibility::Hidden);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UMainGameWidget::IsBookOpen() const
|
bool UMainGameWidget::IsBookOpen() const
|
||||||
@@ -124,6 +144,11 @@ bool UMainGameWidget::IsBazarWidgetOpen() const
|
|||||||
return WidgetStack.Contains(Bazar_Widget);
|
return WidgetStack.Contains(Bazar_Widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool UMainGameWidget::IsScreenActionInputDisplayWidgetOpen() const
|
||||||
|
{
|
||||||
|
return ScreenActionInputDisplay_Widget->GetVisibility() == ESlateVisibility::Visible;
|
||||||
|
}
|
||||||
|
|
||||||
void UMainGameWidget::CheckOpenWidgets()
|
void UMainGameWidget::CheckOpenWidgets()
|
||||||
{
|
{
|
||||||
if (!PlayerController)
|
if (!PlayerController)
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
|
#include "InputAction.h"
|
||||||
|
#include "InputMappingContext.h"
|
||||||
#include "Blueprint/UserWidget.h"
|
#include "Blueprint/UserWidget.h"
|
||||||
|
|
||||||
#include "EleriBaseWidget.generated.h"
|
#include "EleriBaseWidget.generated.h"
|
||||||
@@ -16,6 +18,35 @@ enum class EEleriUIInputAction : uint8
|
|||||||
TabRight
|
TabRight
|
||||||
};
|
};
|
||||||
|
|
||||||
|
USTRUCT(BlueprintType)
|
||||||
|
struct FEleriActionInputData
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
FText ActionName;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
UInputAction* InputAction;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
UInputMappingContext* MappingContext;
|
||||||
|
|
||||||
|
// True = Tap | False = Hold
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
bool bSingleTapOrHold = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
USTRUCT(BlueprintType)
|
||||||
|
struct FEleriActionInputData_List
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
TArray<FEleriActionInputData> List;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -25,6 +56,11 @@ class PROJECTELERI_API UEleriBaseWidget : public UUserWidget
|
|||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Input Prompts")
|
||||||
|
bool bShowInputMapsWhileOnScreen = true;
|
||||||
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Input Prompts")
|
||||||
|
TMap<FName, FEleriActionInputData_List> InputDataMap;
|
||||||
|
|
||||||
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
||||||
void ToggleWidget(bool bActive);
|
void ToggleWidget(bool bActive);
|
||||||
@@ -33,4 +69,7 @@ public:
|
|||||||
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
||||||
void HandleUiInputAction(EEleriUIInputAction InputAction);
|
void HandleUiInputAction(EEleriUIInputAction InputAction);
|
||||||
virtual void HandleUiInputAction_Implementation(EEleriUIInputAction InputAction);
|
virtual void HandleUiInputAction_Implementation(EEleriUIInputAction InputAction);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Eleri|UI")
|
||||||
|
void DisplayInputPrompts(const FName PromptMapKey = "Default");
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#include "MainGameWidget.generated.h"
|
#include "MainGameWidget.generated.h"
|
||||||
|
|
||||||
|
struct FEleriActionInputData;
|
||||||
|
class UScreenActionInputDisplay;
|
||||||
class UCalendarScreen;
|
class UCalendarScreen;
|
||||||
class UAlchemyWidget;
|
class UAlchemyWidget;
|
||||||
class UInventoryWidget;
|
class UInventoryWidget;
|
||||||
@@ -144,6 +146,11 @@ public:
|
|||||||
UEleriBaseWidget* GetBazarWidget() { return Bazar_Widget; }
|
UEleriBaseWidget* GetBazarWidget() { return Bazar_Widget; }
|
||||||
UFUNCTION(BlueprintCallable, BlueprintPure)
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
||||||
bool IsBazarWidgetOpen() const;
|
bool IsBazarWidgetOpen() const;
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
||||||
|
UScreenActionInputDisplay* GetScreenActionInputDisplayWidget() { return ScreenActionInputDisplay_Widget; }
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
||||||
|
bool IsScreenActionInputDisplayWidgetOpen() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UPROPERTY(BlueprintReadWrite, Category = "Gradient Picker Widget Binding", meta = (BindWidget))
|
UPROPERTY(BlueprintReadWrite, Category = "Gradient Picker Widget Binding", meta = (BindWidget))
|
||||||
@@ -194,6 +201,9 @@ protected:
|
|||||||
// Calendar
|
// Calendar
|
||||||
UPROPERTY(meta = (BindWidget))
|
UPROPERTY(meta = (BindWidget))
|
||||||
UEleriBaseWidget* Bazar_Widget;
|
UEleriBaseWidget* Bazar_Widget;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UScreenActionInputDisplay* ScreenActionInputDisplay_Widget;
|
||||||
|
|
||||||
// Minigames UI
|
// Minigames UI
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
|
||||||
|
|
||||||
|
|
||||||
#include "CommonInputActionWidget.h"
|
|
||||||
|
|
||||||
void UCommonInputActionWidget::UpdateActionWidget()
|
|
||||||
{
|
|
||||||
Super::UpdateActionWidget();
|
|
||||||
|
|
||||||
if (MyIcon.IsValid())
|
|
||||||
{
|
|
||||||
MyIcon->SetColorAndOpacity(InputImageColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "CommonActionWidget.h"
|
|
||||||
#include "CommonInputActionWidget.generated.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
UCLASS()
|
|
||||||
class PROJECTELERI_API UCommonInputActionWidget : public UCommonActionWidget
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
||||||
FLinearColor InputImageColor;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
virtual void UpdateActionWidget() override;
|
|
||||||
};
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
|
||||||
|
|
||||||
|
|
||||||
#include "EleriButtonGroupBase.h"
|
|
||||||
|
|
||||||
void UEleriButtonGroupBase::SelectButton(UCommonButtonBase* Button, bool bAllowSound) {
|
|
||||||
int32 Index = FindButtonIndex(Button);
|
|
||||||
if (Index == GetSelectedButtonIndex()) return;
|
|
||||||
|
|
||||||
SelectButtonAtIndex(Index, bAllowSound);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UEleriButtonGroupBase::AddButtonToGroup(UCommonButtonBase* Button) {
|
|
||||||
AddWidget(Button);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UEleriButtonGroupBase::RemoveAllButtonsFromGroup() {
|
|
||||||
RemoveAll();
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "Groups/CommonButtonGroupBase.h"
|
|
||||||
#include "EleriButtonGroupBase.generated.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
UCLASS(BlueprintType)
|
|
||||||
class PROJECTELERI_API UEleriButtonGroupBase : public UCommonButtonGroupBase
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Eleri|Button Group")
|
|
||||||
void SelectButton(class UCommonButtonBase* Button, bool bAllowSound = false);
|
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Eleri|Button Group")
|
|
||||||
void AddButtonToGroup(class UCommonButtonBase* Button);
|
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Eleri|Button Group")
|
|
||||||
void RemoveAllButtonsFromGroup();
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "ScreenActionInputDisplay.h"
|
||||||
22
Source/ProjectEleri/UI/Helpers/ScreenActionInputDisplay.h
Normal file
22
Source/ProjectEleri/UI/Helpers/ScreenActionInputDisplay.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "UI/EleriBaseWidget.h"
|
||||||
|
#include "ScreenActionInputDisplay.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class PROJECTELERI_API UScreenActionInputDisplay : public UEleriBaseWidget
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
public:
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "Eleri|UI")
|
||||||
|
void DisplayScreenActionInputs(const TArray<FEleriActionInputData>& InputList);
|
||||||
|
|
||||||
|
};
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "CommonUserWidget.h"
|
#include "UI/EleriBaseWidget.h"
|
||||||
#include "InteractionWidget.generated.h"
|
#include "InteractionWidget.generated.h"
|
||||||
|
|
||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnDisplayInteractionMenu, bool, bActive);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnDisplayInteractionMenu, bool, bActive);
|
||||||
@@ -12,7 +12,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnDisplayInteractionMenu, bool, bAc
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class PROJECTELERI_API UInteractionWidget : public UCommonUserWidget
|
class PROJECTELERI_API UInteractionWidget : public UEleriBaseWidget
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user