// REALMS IN RUIN. Copyright (c) 2025 Trevor Edwards. All rights reserved. #pragma once #include "CoreMinimal.h" #include "GameFramework/HUD.h" #include "AbilitySystemComponent.h" #include "AttributeSet.h" #include "RIRHUD.generated.h" class UOverlayWidgetController; class URIRUserWidget; struct FWidgetControllerParams; /** * */ UCLASS() class REALMSINRUIN_API ARIRHUD : public AHUD { GENERATED_BODY() public: // Reference to the instantiated overlay widget displayed on the player's screen UPROPERTY() TObjectPtr OverlayWidget; // Returns (or creates) the Overlay Widget Controller with the specified parameters UOverlayWidgetController* GetOverlayWidgetController(const FWidgetControllerParams& WCParams); // Initializes the overlay HUD with controller and gameplay-related data void InitOverlay(APlayerController* PC, APlayerState* PS, UAbilitySystemComponent* ASC, UAttributeSet* AS); protected: private: // The widget class used to instantiate the overlay (should be assigned in the editor or constructor) UPROPERTY(EditAnywhere) TSubclassOf OverlayWidgetClass; // The instantiated controller responsible for providing data and logic to the overlay widget UPROPERTY() TObjectPtr OverlayWidgetController; // The controller class to instantiate (should also be set in the editor or constructor) UPROPERTY(EditAnywhere) TSubclassOf OverlayWidgetControllerClass; };