Add the option to have no delay on input image change

This commit is contained in:
Steve Streeting 2024-07-02 14:35:21 +01:00
parent 191ab410aa
commit 077fea7d12
2 changed files with 13 additions and 2 deletions

View File

@ -153,9 +153,16 @@ void UInputImage::UpdateImage()
}
void UInputImage::MarkImageDirty()
{
if (UpdateDelay > 0)
{
bIsDirty = true;
DelayUpdate = 0.1f;
DelayUpdate = UpdateDelay;
}
else
{
UpdateImage();
}
}
// Tickables

View File

@ -37,6 +37,10 @@ protected:
UPROPERTY(EditAnywhere)
FKey Key;
/// When input mode changes, how quickly to update
UPROPERTY(EditAnywhere)
float UpdateDelay = 0.1f;
/// The player index for which the input should be looked up
UPROPERTY(EditAnywhere)
int PlayerIndex = 0;