// Oleg Petruny proprietary.

#pragma once

#include "Blueprint/UserWidget.h"

#include "WorldDilationResponsiveUserWidget.generated.h"

/**
 * Automatically update animations speed to sync with world time dilation
 */
UCLASS()
class UWorldDilationResponsiveUserWidget : public UUserWidget
{
    GENERATED_BODY()

public:
    virtual bool Initialize() override;
    virtual void BeginDestroy() override;

protected:
    UFUNCTION()
    void UpdateAnimations(float newSpeed);
    virtual void UpdateAnimation(UWidget* widget, float newSpeed);

    UPROPERTY(EditDefaultsOnly)
    int32 maxDepth = 2;
};
