31 lines
877 B
C++
31 lines
877 B
C++
// Copyright Pacificao. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/HUD.h"
|
|
#include "AgrarianDebugHUD.generated.h"
|
|
|
|
class UAgrarianInventoryComponent;
|
|
class UAgrarianSurvivalComponent;
|
|
|
|
UCLASS()
|
|
class AAgrarianDebugHUD : public AHUD
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void DrawHUD() override;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|HUD")
|
|
bool bShowDebugHUD = true;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|HUD", meta = (ClampMin = "0.25"))
|
|
float TextScale = 1.0f;
|
|
|
|
protected:
|
|
void DrawSurvival(const UAgrarianSurvivalComponent* SurvivalComponent, float X, float& Y) const;
|
|
void DrawInventory(const UAgrarianInventoryComponent* InventoryComponent, float X, float& Y) const;
|
|
void DrawLine(const FString& Text, float X, float& Y, const FColor& Color = FColor::White) const;
|
|
};
|