Add MVP frontend audio hooks

This commit is contained in:
2026-05-19 12:35:30 -07:00
parent f6e126aabb
commit d0ad64418d
5 changed files with 99 additions and 1 deletions
@@ -7,6 +7,7 @@
#include "AgrarianMvpFrontendWidget.generated.h"
class UButton;
class USoundBase;
class UTextBlock;
class UVerticalBox;
@@ -57,6 +58,18 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI")
bool bUseHighContrast = false;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio")
TObjectPtr<USoundBase> UiConfirmSound;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio")
TObjectPtr<USoundBase> UiBackSound;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio")
TObjectPtr<USoundBase> UiSelectionSound;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio")
TObjectPtr<USoundBase> UiSaveQuitSound;
UFUNCTION(BlueprintCallable, Category = "Agrarian|MVP UI")
void SetActiveScreen(EAgrarianMvpFrontendScreen NewScreen);
@@ -90,6 +103,7 @@ private:
void RebuildFrontendTree();
UTextBlock* AddText(UVerticalBox* Parent, const FText& Text, int32 FontSize, bool bBold, const FLinearColor& Color, float BottomPadding);
UButton* AddButton(UVerticalBox* Parent, const FText& Text, const FLinearColor& NormalColor, const FLinearColor& HoveredColor, float BottomPadding);
void PlayUiSound(USoundBase* Sound) const;
UFUNCTION()
void FocusPrimaryButton();