Compare commits

...

4 Commits

82 changed files with 297 additions and 620 deletions

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,7 @@ GameName=ProjectEleri
DefaultCompletionMode=KeepState DefaultCompletionMode=KeepState
[/Script/EngineSettings.GameMapsSettings] [/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/Maps/Startmap.Startmap EditorStartupMap=/Game/Maps/Persistent_GameWorld.Persistent_GameWorld
GameDefaultMap=/Game/Maps/Persistent_GameWorld.Persistent_GameWorld GameDefaultMap=/Game/Maps/Persistent_GameWorld.Persistent_GameWorld
TransitionMap= TransitionMap=
bUseSplitscreen=True bUseSplitscreen=True

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.

View File

@@ -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

View File

@@ -905,31 +905,16 @@ void AEleriPlayerController::OnOrdersToggle(const FInputActionValue &Value)
} }
else else
{ {
OrdersUI = CreateWidget(this, OrdersBlueprint);
if (!IsValid(OrdersUI))
return;
OrdersUI->AddToViewport();
AddToMenuStack(OrdersUI);
SetShowMouseCursor(true);
SetInputMode(FInputModeGameAndUI());
OrdersOpen = true;
} }
} }
void AEleriPlayerController::OnCalendarToggle(const FInputActionValue &Value) void AEleriPlayerController::OnCalendarToggle(const FInputActionValue &Value)
{ {
if (Paused || IsDialogueOpen() || (IsInMenu() && !MainGameUI->IsBookOpen()) || !MoveActorsComp || MoveActorsComp->IsRemovingMode()) if (Paused || IsDialogueOpen() || (IsInMenu() && !MainGameUI->IsCalendarOpen()) || !MoveActorsComp || MoveActorsComp->IsRemovingMode())
return; return;
if (!MainGameUI->IsCalendarOpen()) OpenCalendarWindow();
{
OpenCalendarWindow();
}
else
{
CloseCalendarWindow();
}
} }
void AEleriPlayerController::OnBookNextPage(const FInputActionValue &Value) void AEleriPlayerController::OnBookNextPage(const FInputActionValue &Value)
@@ -1012,7 +997,7 @@ UUserWidget *AEleriPlayerController::OpenInventory(bool JustSelecting, bool Shop
UInventoryComponent *MainInv = PlayerInventory; UInventoryComponent *MainInv = PlayerInventory;
UInventoryComponent *OtherInv = IsValid(Inventory) ? Inventory : nullptr; UInventoryComponent *OtherInv = IsValid(Inventory) ? Inventory : nullptr;
MainGameUI->OpenWidget(MainGameUI->GetInventoryWidget()); MainGameUI->OpenWidget(MainGameUI->GetInventoryWidget());
MainGameUI->GetInventoryWidget()->ToggleWidget(true); //MainGameUI->GetInventoryWidget()->ToggleWidget(true);
MainGameUI->GetInventoryWidget()->Setup(MainInv, OtherInv, Shop, JustSelecting, RestrictTabs, bSelectMultiple, bShowDescription, bShowPropertyMap); MainGameUI->GetInventoryWidget()->Setup(MainInv, OtherInv, Shop, JustSelecting, RestrictTabs, bSelectMultiple, bShowDescription, bShowPropertyMap);
return MainGameUI->GetInventoryWidget(); return MainGameUI->GetInventoryWidget();
@@ -1031,7 +1016,7 @@ UUserWidget *AEleriPlayerController::OpenBookOfAlchemy(UItemDataAsset *ItemToPre
bBookAnimating = true; bBookAnimating = true;
MainGameUI->GetBookWidget()->Setup(ItemToPresent, false); MainGameUI->GetBookWidget()->Setup(ItemToPresent, false);
PlayerCharacter->ToggleBook(true); PlayerCharacter->ToggleBook(true);
MainGameUI->ToggleBookWidget(true); MainGameUI->OpenWidget(MainGameUI->GetBookWidget());
MainGameUI->ToggleGameMenu(false); MainGameUI->ToggleGameMenu(false);
@@ -1082,7 +1067,7 @@ void AEleriPlayerController::DisableBookAnimating()
void AEleriPlayerController::CloseOrdersUI() void AEleriPlayerController::CloseOrdersUI()
{ {
OrdersOpen = false; OrdersOpen = false;
RemoveFromMenuStack(OrdersUI);
OrdersUI->RemoveFromParent(); OrdersUI->RemoveFromParent();
if (MenuStack.Num() == 0) if (MenuStack.Num() == 0)
{ {
@@ -1095,56 +1080,23 @@ UMainMenuWidget *AEleriPlayerController::OpenMainMenu()
{ {
if (!IsValid(MainGameUI)) if (!IsValid(MainGameUI))
return nullptr; return nullptr;
UMainMenuWidget *MainMenu = MainGameUI->GetMainMenuWidget();
if (!IsValid(MainMenu))
return nullptr;
AddToMenuStack(MainMenu); MainGameUI->OpenWidget(MainGameUI->GetMainMenuWidget());
SetInputMode(FInputModeGameAndUI());
SetShowMouseCursor(true);
MainGameUI->ToggleMainMenuWidget(true);
SetPause(true);
return MainMenu; return MainGameUI->GetMainMenuWidget();
} }
void AEleriPlayerController::CloseMainMenu() void AEleriPlayerController::CloseMainMenu()
{ {
if (!IsValid(MainGameUI)) MainGameUI->CloseWidget(MainGameUI->GetMainMenuWidget());
return;
UMainMenuWidget *MainMenu = MainGameUI->GetMainMenuWidget();
if (!IsValid(MainMenu))
return;
RemoveFromMenuStack(MainMenu);
MainGameUI->ToggleMainMenuWidget(false);
SetShowMouseCursor(false);
SetInputMode(FInputModeGameOnly());
SetPause(false);
} }
UEleriBaseWidget *AEleriPlayerController::ToggleAlchemyMenu(bool bOpen) UEleriBaseWidget *AEleriPlayerController::ToggleAlchemyMenu(bool bOpen)
{ {
if (bOpen && MainGameUI->IsAlchemyOpen()) if (MainGameUI->AnyWidgetOpen())
return MainGameUI->GetAlchemyWidget(); return nullptr;
if (!bOpen && !MainGameUI->IsAlchemyOpen())
return MainGameUI->GetAlchemyWidget();
MainGameUI->GetAlchemyWidget()->ToggleWidget(bOpen); MainGameUI->OpenWidget(MainGameUI->GetAlchemyWidget());
if (bOpen)
{
AddToMenuStack(MainGameUI->GetAlchemyWidget());
SetInputMode(FInputModeGameAndUI());
}
else
{
CloseGenericMenu(MainGameUI->GetAlchemyWidget());
}
SetShowMouseCursor(bOpen);
MainGameUI->ToggleAlchemyWidget(bOpen);
return MainGameUI->GetAlchemyWidget(); return MainGameUI->GetAlchemyWidget();
} }
@@ -1154,20 +1106,7 @@ UEleriBaseWidget *AEleriPlayerController::ToggleDialogueWindow(bool bOpen)
if (!IsValid(MainGameUI->GetDialogueWidget()) || MainGameUI->GetDialogueWidget()->IsAnimating()) if (!IsValid(MainGameUI->GetDialogueWidget()) || MainGameUI->GetDialogueWidget()->IsAnimating())
return nullptr; return nullptr;
MainGameUI->ToggleDialogueWidget(bOpen); MainGameUI->OpenWidget(MainGameUI->GetDialogueWidget());
MainGameUI->GetDialogueWidget()->ToggleWidget(bOpen);
if (bOpen)
{
AddToMenuStack(MainGameUI->GetDialogueWidget());
SetInputMode(FInputModeGameAndUI());
SetShowMouseCursor(bOpen);
}
else
{
CloseGenericMenu(MainGameUI->GetDialogueWidget());
}
return MainGameUI->GetDialogueWidget(); return MainGameUI->GetDialogueWidget();
} }
@@ -1176,21 +1115,14 @@ UEleriBaseWidget *AEleriPlayerController::ToggleNotificationWindow(bool bOpen)
if (!IsValid(MainGameUI->GetBigNotificationWidget())) if (!IsValid(MainGameUI->GetBigNotificationWidget()))
return nullptr; return nullptr;
MainGameUI->ToggleBigNotificationWidget(bOpen); if (MainGameUI->IsBigNotificationOpen())
if (bOpen)
{ {
AddToMenuStack(MainGameUI->GetBigNotificationWidget()); MainGameUI->CloseWidget(MainGameUI->GetBigNotificationWidget());
SetInputMode(FInputModeGameAndUI());
} }
else else
{ {
CloseGenericMenu(MainGameUI->GetBigNotificationWidget()); MainGameUI->OpenWidget(MainGameUI->GetBigNotificationWidget());
SetInputMode(FInputModeGameOnly());
} }
SetShowMouseCursor(bOpen);
SetPause(bOpen);
return MainGameUI->GetBigNotificationWidget(); return MainGameUI->GetBigNotificationWidget();
} }
@@ -1202,132 +1134,22 @@ UTradeWidget *AEleriPlayerController::OpenTradeWindow(UInventoryComponent *Inven
if (UMainGameWidget *MainWidget = GetMainGameWidget()) if (UMainGameWidget *MainWidget = GetMainGameWidget())
{ {
MainWidget->OpenTradeWidget(Inventory, InRestrictTabs); MainWidget->OpenTradeWidget(Inventory, InRestrictTabs);
UTradeWidget *TradeWidget = MainWidget->GetTradeWidget(); return MainGameUI->GetTradeWidget();
AddToMenuStack(TradeWidget);
SetInputMode(FInputModeGameAndUI());
SetShowMouseCursor(true);
SetPause(true);
return TradeWidget;
} }
return nullptr; return nullptr;
} }
void AEleriPlayerController::CloseTradeWindow()
{
if (UMainGameWidget *MainWidget = GetMainGameWidget())
{
UTradeWidget *TradeWidget = MainWidget->GetTradeWidget();
MainWidget->CloseTradeWidget();
RemoveFromMenuStack(TradeWidget);
SetInputMode(FInputModeGameOnly());
SetShowMouseCursor(false);
SetPause(false);
}
}
UCalendarScreen* AEleriPlayerController::OpenCalendarWindow() UCalendarScreen* AEleriPlayerController::OpenCalendarWindow()
{ {
MainGameUI->ToggleCalendarWidget(true); MainGameUI->OpenWidget(MainGameUI->GetCalendarWidget());
AddToMenuStack(MainGameUI->GetCalendarWidget());
SetInputMode(FInputModeGameAndUI());
SetShowMouseCursor(true);
SetPause(true);
return MainGameUI->GetCalendarWidget(); return MainGameUI->GetCalendarWidget();
} }
void AEleriPlayerController::CloseCalendarWindow()
{
MainGameUI->ToggleCalendarWidget(false);
RemoveFromMenuStack(MainGameUI->GetCalendarWidget());
SetInputMode(FInputModeGameOnly());
SetShowMouseCursor(false);
SetPause(false);
}
UEleriBaseWidget* AEleriPlayerController::OpenBazarWindow() { UEleriBaseWidget* AEleriPlayerController::OpenBazarWindow() {
MainGameUI->ToggleBazarWidget(true); MainGameUI->OpenWidget(MainGameUI->GetBazarWidget());
AddToMenuStack(MainGameUI->GetBazarWidget());
SetInputMode(FInputModeGameAndUI());
SetShowMouseCursor(true);
return MainGameUI->GetBazarWidget(); return MainGameUI->GetBazarWidget();
} }
void AEleriPlayerController::CloseBazarWindow() {
MainGameUI->ToggleBazarWidget(false);
RemoveFromMenuStack(MainGameUI->GetBazarWidget());
SetInputMode(FInputModeGameOnly());
SetShowMouseCursor(false);
}
void AEleriPlayerController::AddToMenuStack(UUserWidget *Widget)
{
MenuStack.AddUnique(Widget);
OnWateringActionEnd(FInputActionValue());
}
void AEleriPlayerController::RemoveFromMenuStack(UUserWidget *Widget)
{
MenuStack.Remove(Widget);
}
bool AEleriPlayerController::OpenGenericMenu(UUserWidget *Widget, bool CloseOthers = false, bool IgnoreInMenu = false)
{
if (!IgnoreInMenu && IsInMenu())
return false;
for (const UUserWidget *StackWidget : MenuStack)
{
if (StackWidget == Widget)
return false;
}
if (CloseOthers)
{
for (UUserWidget *StackWidget : MenuStack)
{
StackWidget->RemoveFromParent();
}
OrdersOpen = false;
}
AddToMenuStack(Widget);
Widget->AddToViewport();
SetShowMouseCursor(true);
SetInputMode(FInputModeGameAndUI());
SetPause(true);
return true;
}
void AEleriPlayerController::CloseGenericMenu(UEleriBaseWidget *Widget)
{
RemoveFromMenuStack(Widget);
Widget->ToggleWidget(false);
if (MenuStack.Num() == 0)
{
SetShowMouseCursor(false);
SetInputMode(FInputModeGameOnly());
SetPause(false);
}
else
{
MenuStack[MenuStack.Num() - 1]->SetUserFocus(this);
MenuStack[MenuStack.Num() - 1]->SetKeyboardFocus();
}
}
void AEleriPlayerController::CloseLastGenericMenu()
{
if (MenuStack.Num() <= 0 || IsValid(MenuStack[MenuStack.Num() - 1]))
return;
// CloseGenericMenu(MenuStack[MenuStack.Num() - 1]);
}
void AEleriPlayerController::OnInteract(const FInputActionValue &Value) void AEleriPlayerController::OnInteract(const FInputActionValue &Value)
{ {
if (!IsValid(PlayerCharacter)) if (!IsValid(PlayerCharacter))
@@ -1362,10 +1184,7 @@ void AEleriPlayerController::StartMinigame(EMinigameType MinigameType, const TSo
MinigameType == EMinigameType::NONE) MinigameType == EMinigameType::NONE)
return; return;
if (UEleriBaseWidget *MinigameWidget = MainGameUI->ToggleMinigamesWidget(MinigameType, DataAsset)) MainGameUI->ToggleMinigamesWidget(MinigameType, DataAsset);
{
OpenGenericMenu(MinigameWidget, false, true);
}
} }
void AEleriPlayerController::CloseMinigame(int32 Score) void AEleriPlayerController::CloseMinigame(int32 Score)
@@ -1373,13 +1192,9 @@ void AEleriPlayerController::CloseMinigame(int32 Score)
if (!IsValid(PlayerCharacter) || !IsValid(MainGameUI) || !MainGameUI->IsAnyMinigameOpen()) if (!IsValid(PlayerCharacter) || !IsValid(MainGameUI) || !MainGameUI->IsAnyMinigameOpen())
return; return;
if (UEleriBaseWidget *MinigameWidget = MainGameUI->GetCurrentlyOpenMinigameWidget()) MainGameUI->ToggleMinigamesWidget(EMinigameType::NONE, nullptr);
if (OnMinigameComplete.IsBound())
{ {
CloseGenericMenu(MinigameWidget); OnMinigameComplete.Execute(Score);
MainGameUI->ToggleMinigamesWidget(EMinigameType::NONE, nullptr);
if (OnMinigameComplete.IsBound())
{
OnMinigameComplete.Execute(Score);
}
} }
} }

View File

@@ -5,14 +5,11 @@
#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) {
if (bActive) { SetVisibility(bActive? ESlateVisibility::Visible : ESlateVisibility::Hidden);
//ActivateWidget();
}
else {
//DeactivateWidget();
}
} }
void UEleriBaseWidget::HandleUiInputAction_Implementation(EEleriUIInputAction InputAction) void UEleriBaseWidget::HandleUiInputAction_Implementation(EEleriUIInputAction InputAction)
@@ -25,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);
}
}

View File

@@ -5,10 +5,11 @@
#include "EleriPlayerController.h" #include "EleriPlayerController.h"
#include "EnhancedInputSubsystems.h" #include "EnhancedInputSubsystems.h"
#include "Kismet/GameplayStatics.h" #include "Kismet/GameplayStatics.h"
#include "UI/InventoryWidget.h"
#include "UI/MainMenuWidget.h"
#include "UI/TradeWidget.h" #include "UI/TradeWidget.h"
#include "UI/AlchemyWidget.h"
#include "ProjectEleri/UI/CalendarScreen.h"
#include "ProjectEleri/DialogueSystem/DialogueWidget.h"
#include "ProjectEleri/UI/Helpers/ScreenActionInputDisplay.h"
void UMainGameWidget::TogglePlaceableUI(bool bEnabled) void UMainGameWidget::TogglePlaceableUI(bool bEnabled)
{ {
@@ -23,101 +24,129 @@ void UMainGameWidget::SwitchKeybindsDisplay(int32 Index)
void UMainGameWidget::CloseLastWidget() void UMainGameWidget::CloseLastWidget()
{ {
if (WidgetStack.IsEmpty()) return; if (WidgetStack.IsEmpty()) return;
CloseWidget(WidgetStack[WidgetStack.Num() - 1]); CloseWidget(WidgetStack[WidgetStack.Num() - 1]);
} }
void UMainGameWidget::OpenWidget(UEleriBaseWidget* Widget) void UMainGameWidget::OpenWidget(UEleriBaseWidget* Widget)
{ {
if (!Widget) return; if (!Widget) return;
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)
{ {
if (!Widget) return; if (!Widget) return;
Widget->ToggleWidget(false); Widget->ToggleWidget(false);
WidgetStack.Remove(Widget); WidgetStack.Remove(Widget);
CheckOpenWidgets(); CheckOpenWidgets();
}
void UMainGameWidget::ToggleBookWidget(bool bActive)
{
if (bActive)
WidgetStack.AddUnique(GetBookWidget());
CheckOpenWidgets(); bool bShouldShowInputPrompts = false;
for (UEleriBaseWidget* WidgetInStack : WidgetStack)
{
if (WidgetInStack->bShowInputMapsWhileOnScreen)
{
WidgetInStack->DisplayInputPrompts();
bShouldShowInputPrompts = true;
}
}
if (!bShouldShowInputPrompts)
{
GetScreenActionInputDisplayWidget()->SetVisibility(ESlateVisibility::Hidden);
}
} }
void UMainGameWidget::ToggleAlchemyWidget(bool bActive) bool UMainGameWidget::IsBookOpen() const
{ {
AlchemyOpen = bActive; return WidgetStack.Contains(Book_Widget);
} }
void UMainGameWidget::ToggleBigNotificationWidget(bool bActive) bool UMainGameWidget::IsInventoryOpen() const
{ {
BigNotificationOpen = bActive; return WidgetStack.Contains(Inventory_Widget);
BigNotification_Widget->ToggleWidget(BigNotificationOpen);
} }
void UMainGameWidget::ToggleDialogueWidget(bool bActive) bool UMainGameWidget::IsAlchemyOpen() const
{ {
DialogueOpen = bActive; return WidgetStack.Contains(Alchemy_Widget);
} }
UMinigameBaseWidget *UMainGameWidget::ToggleMinigamesWidget(EMinigameType MinigameType, const TSoftObjectPtr<UBaseMinigameDataAsset> &DataAsset) bool UMainGameWidget::IsBigNotificationOpen() const
{
return WidgetStack.Contains(BigNotification_Widget);
}
bool UMainGameWidget::IsDialogueOpen() const
{
return WidgetStack.Contains(Dialogue_Widget);
}
UMinigameBaseWidget* UMainGameWidget::ToggleMinigamesWidget(EMinigameType MinigameType, const TSoftObjectPtr<UBaseMinigameDataAsset>& DataAsset)
{ {
MinigameOpen = MinigameType; MinigameOpen = MinigameType;
CurrentlyOpenMinigameWidget = K2_OnMinigameOpen(MinigameOpen, DataAsset); if (MinigameType == EMinigameType::NONE)
{
CloseWidget(CurrentlyOpenMinigameWidget);
}
else
{
CurrentlyOpenMinigameWidget = K2_OnMinigameOpen(MinigameOpen, DataAsset);
OpenWidget(CurrentlyOpenMinigameWidget);
}
return CurrentlyOpenMinigameWidget; return CurrentlyOpenMinigameWidget;
} }
void UMainGameWidget::ToggleMainMenuWidget(bool bActive) bool UMainGameWidget::IsMainMenuOpen() const
{ {
MainMenuOpen = bActive; return WidgetStack.Contains(MainMenuScreenUI_Widget);
MainMenuScreenUI_Widget->ToggleWidget(MainMenuOpen);
} }
UEleriBaseWidget *UMainGameWidget::ShowAmountPickerWidget() UEleriBaseWidget* UMainGameWidget::ShowAmountPickerWidget()
{ {
AmountPicker_Widget->ToggleWidget(true); OpenWidget(AmountPicker_Widget);
return AmountPicker_Widget; return AmountPicker_Widget;
} }
UEleriBaseWidget *UMainGameWidget::ShowImportantDialoguePromptWidget() UEleriBaseWidget* UMainGameWidget::ShowImportantDialoguePromptWidget()
{ {
ImportantDialoguePrompt_Widget->ToggleWidget(true); OpenWidget(ImportantDialoguePrompt_Widget);
return ImportantDialoguePrompt_Widget; return ImportantDialoguePrompt_Widget;
} }
void UMainGameWidget::OpenTradeWidget(UInventoryComponent *Inventory, const TArray<EInventoryTabType>& InRestrictTabs) void UMainGameWidget::OpenTradeWidget(UInventoryComponent* Inventory, const TArray<EInventoryTabType>& InRestrictTabs)
{ {
TradeOpen = true; Trade_Widget->SetupTradeWidget(Inventory, InRestrictTabs);
Trade_Widget->OpenTradeWidget(Inventory, InRestrictTabs); OpenWidget(GetTradeWidget());
} }
void UMainGameWidget::CloseTradeWidget() bool UMainGameWidget::IsTradeOpen() const
{ {
TradeOpen = false; return WidgetStack.Contains(Trade_Widget);
Trade_Widget->ToggleWidget(false);
CheckOpenWidgets();
} }
void UMainGameWidget::ToggleCalendarWidget(bool bActive) bool UMainGameWidget::IsCalendarOpen() const
{ {
CalendarOpen = bActive; return WidgetStack.Contains(Calendar_Widget);
Calendar_Widget->ToggleWidget(CalendarOpen);
CheckOpenWidgets();
} }
void UMainGameWidget::ToggleBazarWidget(bool bActive) { bool UMainGameWidget::IsBazarWidgetOpen() const
BazarWidgetOpen = bActive; {
Bazar_Widget->ToggleWidget(BazarWidgetOpen); return WidgetStack.Contains(Bazar_Widget);
CheckOpenWidgets(); }
bool UMainGameWidget::IsScreenActionInputDisplayWidgetOpen() const
{
return ScreenActionInputDisplay_Widget->GetVisibility() == ESlateVisibility::Visible;
} }
void UMainGameWidget::CheckOpenWidgets() void UMainGameWidget::CheckOpenWidgets()
@@ -126,14 +155,10 @@ void UMainGameWidget::CheckOpenWidgets()
{ {
PlayerController = UGameplayStatics::GetPlayerController(this, 0); PlayerController = UGameplayStatics::GetPlayerController(this, 0);
} }
//const bool bAnyOpenWidgets = IsAlchemyOpen() || IsAnyMinigameOpen() || IsBazarWidgetOpen() || IsBigNotificationOpen() ||
// IsBookOpen() || IsCalendarOpen() || IsDialogueOpen() || IsInventoryOpen() || IsMainMenuOpen() || IsTradeOpen();
const bool bAnyOpenWidgets = AnyWidgetOpen(); const bool bAnyOpenWidgets = AnyWidgetOpen();
const bool bShouldBePaused = WidgetStack.Contains(GetBookWidget()); const bool bShouldBePaused = WidgetStack.Contains(GetBookWidget());
if (bAnyOpenWidgets) if (bAnyOpenWidgets)
{ {
PlayerController->SetInputMode(FInputModeGameAndUI()); PlayerController->SetInputMode(FInputModeGameAndUI());
@@ -142,13 +167,14 @@ void UMainGameWidget::CheckOpenWidgets()
{ {
PlayerController->SetInputMode(FInputModeGameOnly()); PlayerController->SetInputMode(FInputModeGameOnly());
} }
PlayerController->SetShowMouseCursor(bAnyOpenWidgets); PlayerController->SetShowMouseCursor(bAnyOpenWidgets);
PlayerController->SetPause(bShouldBePaused); PlayerController->SetPause(bShouldBePaused);
// Get the Enhanced Input Local Player Subsystem from the Local Player related to our Player Controller. // Get the Enhanced Input Local Player Subsystem from the Local Player related to our Player Controller.
if (UEnhancedInputLocalPlayerSubsystem *Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PlayerController->GetLocalPlayer())) if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(
PlayerController->GetLocalPlayer()))
{ {
if (const AEleriPlayerController* EleriPC = Cast<AEleriPlayerController>(PlayerController)) if (const AEleriPlayerController* EleriPC = Cast<AEleriPlayerController>(PlayerController))
{ {

View File

@@ -4,7 +4,7 @@
#include "UI/TradeWidget.h" #include "UI/TradeWidget.h"
#include "ProjectEleri/Public/InventoryComponent.h" #include "ProjectEleri/Public/InventoryComponent.h"
void UTradeWidget::OpenTradeWidget(UInventoryComponent* Inventory, const TArray<EInventoryTabType>& InRestrictTabs) { void UTradeWidget::SetupTradeWidget(UInventoryComponent* Inventory, const TArray<EInventoryTabType>& InRestrictTabs) {
InventoryRef = Inventory; InventoryRef = Inventory;
if (InventoryRef) { if (InventoryRef) {
@@ -13,6 +13,4 @@ void UTradeWidget::OpenTradeWidget(UInventoryComponent* Inventory, const TArray<
bIsChest = InventoryRef->IsChest; bIsChest = InventoryRef->IsChest;
RestrictedTabs = InRestrictTabs; RestrictedTabs = InRestrictTabs;
} }
ToggleWidget(true);
} }

View File

@@ -33,7 +33,7 @@ public class ProjectEleri : ModuleRules
"InteractionSystem" "InteractionSystem"
}); });
PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "OnlineSubsystemUtils", "UMGEditor" }); PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "OnlineSubsystemUtils" });
// Uncomment if you are using Slate UI // Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" }); // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

View File

@@ -353,29 +353,12 @@ public:
UFUNCTION(BlueprintCallable, meta = (AutoCreateRefTerm = "InRestrictTabs")) UFUNCTION(BlueprintCallable, meta = (AutoCreateRefTerm = "InRestrictTabs"))
UTradeWidget* OpenTradeWindow(UInventoryComponent* Inventory, const TArray<EInventoryTabType>& InRestrictTabs); UTradeWidget* OpenTradeWindow(UInventoryComponent* Inventory, const TArray<EInventoryTabType>& InRestrictTabs);
UFUNCTION(BlueprintCallable)
void CloseTradeWindow();
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
UCalendarScreen* OpenCalendarWindow(); UCalendarScreen* OpenCalendarWindow();
UFUNCTION(BlueprintCallable)
void CloseCalendarWindow();
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
UEleriBaseWidget* OpenBazarWindow(); UEleriBaseWidget* OpenBazarWindow();
UFUNCTION(BlueprintCallable)
void CloseBazarWindow();
void AddToMenuStack(UUserWidget* Widget);
void RemoveFromMenuStack(UUserWidget* Widget);
UFUNCTION(BlueprintCallable)
bool OpenGenericMenu(UUserWidget* Widget, bool CloseOthers, bool IgnoreInMenu);
UFUNCTION(BlueprintCallable)
void CloseGenericMenu(UEleriBaseWidget* Widget);
UFUNCTION(BlueprintCallable)
void CloseLastGenericMenu();
void OnInteract(const FInputActionValue& Value); void OnInteract(const FInputActionValue& Value);
void OnInteractExit(const FInputActionValue& Value); void OnInteractExit(const FInputActionValue& Value);

View File

@@ -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");
}; };

View File

@@ -7,15 +7,17 @@
#include "Components/Overlay.h" #include "Components/Overlay.h"
#include "Components/WidgetSwitcher.h" #include "Components/WidgetSwitcher.h"
#include "ProjectEleri/UI/MinigameBaseWidget.h" #include "ProjectEleri/UI/MinigameBaseWidget.h"
#include "ProjectEleri/UI/CalendarScreen.h"
#include "ProjectEleri/Public/InventoryComponent.h" #include "ProjectEleri/Public/InventoryComponent.h"
#include "MainGameWidget.generated.h" #include "MainGameWidget.generated.h"
struct FEleriActionInputData;
class UScreenActionInputDisplay;
class UCalendarScreen;
class UAlchemyWidget;
class UInventoryWidget; class UInventoryWidget;
class UBookOfAlchemyWidget; class UBookOfAlchemyWidget;
class UInteractionWidget; class UInteractionWidget;
class UAlchemyWidget;
class UMainMenuWidget; class UMainMenuWidget;
class UTradeWidget; class UTradeWidget;
class UDialogueWidget; class UDialogueWidget;
@@ -68,40 +70,32 @@ public:
// Book widget // Book widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UBookOfAlchemyWidget *GetBookWidget() { return Book_Widget; } UBookOfAlchemyWidget *GetBookWidget() { return Book_Widget; }
UFUNCTION(BlueprintCallable)
void ToggleBookWidget(bool bActive);
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsBookOpen() const { return WidgetStack.Contains(Book_Widget); } bool IsBookOpen() const;
// Inventory widget // Inventory widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UInventoryWidget *GetInventoryWidget() { return Inventory_Widget; } UInventoryWidget *GetInventoryWidget() { return Inventory_Widget; }
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsInventoryOpen() const { return WidgetStack.Contains(Inventory_Widget); } bool IsInventoryOpen() const;
// Alchemy widget // Alchemy widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UAlchemyWidget *GetAlchemyWidget() { return Alchemy_Widget; } UAlchemyWidget *GetAlchemyWidget() { return Alchemy_Widget; }
UFUNCTION(BlueprintCallable)
void ToggleAlchemyWidget(bool bActive);
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsAlchemyOpen() const { return AlchemyOpen; } bool IsAlchemyOpen() const;
// Big Notification widget // Big Notification widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UEleriBaseWidget *GetBigNotificationWidget() { return BigNotification_Widget; } UEleriBaseWidget *GetBigNotificationWidget() { return BigNotification_Widget; }
UFUNCTION(BlueprintCallable)
void ToggleBigNotificationWidget(bool bActive);
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsBigNotificationOpen() const { return BigNotificationOpen; } bool IsBigNotificationOpen() const;
// Dialogue widget // Dialogue widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UDialogueWidget*GetDialogueWidget() { return Dialogue_Widget; } UDialogueWidget*GetDialogueWidget() { return Dialogue_Widget; }
UFUNCTION(BlueprintCallable)
void ToggleDialogueWidget(bool bActive);
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsDialogueOpen() const { return DialogueOpen; } bool IsDialogueOpen() const;
// Minigames widget // Minigames widget
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
@@ -119,10 +113,8 @@ public:
// Main menu widget // Main menu widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UMainMenuWidget *GetMainMenuWidget() { return MainMenuScreenUI_Widget; } UMainMenuWidget *GetMainMenuWidget() { return MainMenuScreenUI_Widget; }
UFUNCTION(BlueprintCallable)
void ToggleMainMenuWidget(bool bActive);
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsMainMenuOpen() const { return MainMenuOpen; } bool IsMainMenuOpen() const;
// Amount Picker widget // Amount Picker widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
@@ -140,25 +132,25 @@ public:
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UTradeWidget *GetTradeWidget() { return Trade_Widget; } UTradeWidget *GetTradeWidget() { return Trade_Widget; }
void OpenTradeWidget(UInventoryComponent *Inventory, const TArray<EInventoryTabType>& InRestrictTabs = TArray<EInventoryTabType>{}); void OpenTradeWidget(UInventoryComponent *Inventory, const TArray<EInventoryTabType>& InRestrictTabs = TArray<EInventoryTabType>{});
void CloseTradeWidget();
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsTradeOpen() const { return TradeOpen; } bool IsTradeOpen() const;
// Calendar widget // Calendar widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UCalendarScreen *GetCalendarWidget() { return Calendar_Widget; } UCalendarScreen *GetCalendarWidget() { return Calendar_Widget; }
UFUNCTION(BlueprintCallable)
void ToggleCalendarWidget(bool bActive);
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsCalendarOpen() const { return CalendarOpen; } bool IsCalendarOpen() const;
// Bazar widget // Bazar widget
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
UEleriBaseWidget* GetBazarWidget() { return Bazar_Widget; } UEleriBaseWidget* GetBazarWidget() { return Bazar_Widget; }
UFUNCTION(BlueprintCallable)
void ToggleBazarWidget(bool bActive);
UFUNCTION(BlueprintCallable, BlueprintPure) UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsBazarWidgetOpen() const { return BazarWidgetOpen; } 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))
@@ -173,32 +165,22 @@ protected:
// Book // Book
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
UBookOfAlchemyWidget *Book_Widget; UBookOfAlchemyWidget *Book_Widget;
UPROPERTY()
bool BookOpen = false;
// Inventory // Inventory
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
UInventoryWidget *Inventory_Widget; UInventoryWidget *Inventory_Widget;
UPROPERTY()
bool InventoryOpen = false;
// Alchemy // Alchemy
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
UAlchemyWidget *Alchemy_Widget; UAlchemyWidget *Alchemy_Widget;
UPROPERTY()
bool AlchemyOpen = false;
// Notification Big // Notification Big
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
UEleriBaseWidget *BigNotification_Widget; UEleriBaseWidget *BigNotification_Widget;
UPROPERTY()
bool BigNotificationOpen = false;
// Dialogue UI // Dialogue UI
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
UDialogueWidget*Dialogue_Widget; UDialogueWidget*Dialogue_Widget;
UPROPERTY()
bool DialogueOpen = false;
// Important dialogue prompt // Important dialogue prompt
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
@@ -211,20 +193,17 @@ protected:
// Trade // Trade
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
UTradeWidget *Trade_Widget; UTradeWidget *Trade_Widget;
UPROPERTY()
bool TradeOpen = false;
// Calendar // Calendar
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
UCalendarScreen *Calendar_Widget; UCalendarScreen *Calendar_Widget;
UPROPERTY()
bool CalendarOpen = false;
// Calendar // Calendar
UPROPERTY(meta = (BindWidget)) UPROPERTY(meta = (BindWidget))
UEleriBaseWidget* Bazar_Widget; UEleriBaseWidget* Bazar_Widget;
UPROPERTY()
bool BazarWidgetOpen = false; UPROPERTY(meta = (BindWidget))
UScreenActionInputDisplay* ScreenActionInputDisplay_Widget;
// Minigames UI // Minigames UI
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget)) UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
@@ -237,8 +216,6 @@ protected:
// Main Menu // Main Menu
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget)) UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
UMainMenuWidget *MainMenuScreenUI_Widget; UMainMenuWidget *MainMenuScreenUI_Widget;
UPROPERTY()
bool MainMenuOpen = false;
UPROPERTY() UPROPERTY()
APlayerController* PlayerController; APlayerController* PlayerController;

View File

@@ -19,7 +19,7 @@ class PROJECTELERI_API UTradeWidget : public UEleriBaseWidget
public: public:
UFUNCTION() UFUNCTION()
void OpenTradeWidget(UInventoryComponent* Inventory, const TArray<EInventoryTabType>& InRestrictTabs = TArray<EInventoryTabType>{}); void SetupTradeWidget(UInventoryComponent* Inventory, const TArray<EInventoryTabType>& InRestrictTabs = TArray<EInventoryTabType>{});
protected: protected:

View File

@@ -85,10 +85,5 @@ public:
// MATH // MATH
UFUNCTION(BlueprintPure, Category = "Eleri|Math") UFUNCTION(BlueprintPure, Category = "Eleri|Math")
static float NegateFloat(const float& Value) { return Value * -1.f; } static float NegateFloat(const float& Value) { return Value * -1.f; }
#if WITH_EDITOR
// Editor shit
UFUNCTION(BlueprintCallable, Category = "Eleri|Audit")
static void LogAssetsUsingCommonUI();
#endif
}; };

View File

@@ -208,49 +208,3 @@ void UMainBlueprintFunctionLibrary::ModifyExp(const UObject* WorldContext, const
StatForgeComponent->ApplyGameplayStatEffect(ExpIncreaseEffect, DataValueMap); StatForgeComponent->ApplyGameplayStatEffect(ExpIncreaseEffect, DataValueMap);
} }
#if WITH_EDITOR
#include "AssetRegistry/AssetRegistryModule.h"
#include "AssetRegistry/IAssetRegistry.h"
#include "WidgetBlueprint.h"
void UMainBlueprintFunctionLibrary::LogAssetsUsingCommonUI()
{
IAssetRegistry& AssetRegistry = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry").Get();
TArray<FAssetData> WidgetBlueprintAssets;
AssetRegistry.GetAssetsByClass(UWidgetBlueprint::StaticClass()->GetClassPathName(), WidgetBlueprintAssets, /*bSearchSubClasses*/ true);
TArray<FString> MatchedPaths;
for (const FAssetData& AssetData : WidgetBlueprintAssets)
{
UWidgetBlueprint* WidgetBP = Cast<UWidgetBlueprint>(AssetData.GetAsset());
if (!WidgetBP || !WidgetBP->GeneratedClass)
{
continue;
}
bool bUsesCommonUI = false;
for (const UClass* Test = WidgetBP->GeneratedClass; Test; Test = Test->GetSuperClass())
{
if (Test->GetName().Contains(TEXT("Common")))
{
bUsesCommonUI = true;
break;
}
}
if (bUsesCommonUI)
{
MatchedPaths.Add(AssetData.GetObjectPathString());
}
}
UE_LOG(LogTemp, Log, TEXT("Found %d widget asset(s) referencing a CommonUI class in their inheritance chain:"), MatchedPaths.Num());
for (const FString& Path : MatchedPaths)
{
UE_LOG(LogTemp, Log, TEXT(" %s"), *Path);
}
}
#endif

View File

@@ -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);
}
}

View File

@@ -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;
};

View File

@@ -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();
}

View File

@@ -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();
};

View File

@@ -0,0 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "ScreenActionInputDisplay.h"

View 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);
};

View File

@@ -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: