// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.

#pragma once

#include "Engine/DeveloperSettingsBackedByCVars.h"

#include "InputBufferGlobalSettings.generated.h"


/**
 * Global settings for the input buffer
 */
UCLASS(Config=Game, defaultconfig, meta=(DisplayName="Input Buffer"))
class COMBOINPUT_API UInputBufferGlobalSettings : public UDeveloperSettingsBackedByCVars
{
	GENERATED_BODY()

public:
	// List of possible combo inputs that can be taken. A combo input is selected from this list
	// either if an action is made while the current combo is inactive, or when the previous
	// action expires.
	UPROPERTY(Config, BlueprintReadOnly, EditDefaultsOnly)
		TSet<TSoftObjectPtr<const class UComboInputAsset>> ComboInputs;

	// Length of time after releasing an input to keep the associated combo action buffered before clearing it.
	UPROPERTY(Config, BlueprintReadOnly, EditDefaultsOnly, meta=(UIMin="0.0", UIMax="0.5", ClampMin="0.0", ClampMax="0.5"))
		float InputReleaseExpirationTimerLength = 0.15f;

	// Length of time within which we can recognise multiple button presses as one input.
	UPROPERTY(Config, BlueprintReadOnly, EditDefaultsOnly, meta=(UIMin="0.01", UIMax="0.25", ClampMin="0.01", ClampMax="0.25"))
		float MultiPressTimerLength = 0.025f;
};
