// Oleg Petruny proprietary.

#pragma once

#include "GameFramework/GameUserSettings.h"

#include "CustomGameSettings.generated.h"

/**
 * Manages custom game settings.
 * Mouse sensetivity and inversion, motion blur usage, fps show.
 */
UCLASS(Config = Game, defaultconfig)
class UCustomGameSettings : public UGameUserSettings
{
    GENERATED_UCLASS_BODY()

public:
    // Is auto defined by UE but implementation is in cpp
    //UCustomGameSettings(const FObjectInitializer& ObjectInitializer);

    UFUNCTION(BlueprintPure, Category = Settings, meta = (DisplayName = "Get Custom Game Settings"))
    static UCustomGameSettings* Get();

    /**
     * Sets mouse sensetivity multiplier
     * @param value [0.1 - 2.0]
     */
    UFUNCTION(BlueprintCallable, Category = Settings)
    void SetMouseSensetivity(float value);

    /** Returns mouse sensetivity multiplier in [0.1 - 2.0] */
    UFUNCTION(BlueprintCallable, Category = Settings)
    float GetMouseSensetivity() const;

    UPROPERTY(Config, BlueprintReadWrite)
    bool bUseMotionBlur;

    UPROPERTY(Config, BlueprintReadWrite)
    bool bShowFps;

    UPROPERTY(Config, BlueprintReadWrite)
    bool bMouseInverted;

protected:
    UPROPERTY(Config)
    float fMouseSensetivity;

};
