﻿using System.Threading.Tasks;
using TTMouseclickSimulator.Core.Environment;

namespace TTMouseclickSimulator.Core.ToontownRewritten.Actions
{
    public class MouseHelpers
    {
        public static readonly Size ReferenceWindowSize = new Size(1600, 1151);

        public static async Task DoSimpleMouseClickAsync(IInteractionProvider provider,
            Coordinates coords, VerticalScaleAlignment valign = VerticalScaleAlignment.Center,
            int buttonDownTimeout = 200)
        {
            var pos = provider.GetCurrentWindowPosition();
            coords = pos.RelativeToAbsoluteCoordinates(pos.ScaleCoordinates(coords,
                ReferenceWindowSize, valign));

            provider.MoveMouse(coords);
            provider.PressMouseButton();
            await provider.WaitAsync(buttonDownTimeout);
            provider.ReleaseMouseButton();
        }

    }
}

﻿using System.Threading.Tasks;
using TTMouseclickSimulator.Core.Environment;

namespace TTMouseclickSimulator.Core.ToontownRewritten.Actions
{
    public class MouseHelpers
    {
        public static readonly Size ReferenceWindowSize = new Size(1600, 1151);

        public static async Task DoSimpleMouseClickAsync(IInteractionProvider provider,
            Coordinates coords, VerticalScaleAlignment valign = VerticalScaleAlignment.Center,
            int buttonDownTimeout = 150)
        {
            var pos = provider.GetCurrentWindowPosition();
            coords = pos.RelativeToAbsoluteCoordinates(pos.ScaleCoordinates(coords,
                ReferenceWindowSize, valign));

            provider.MoveMouse(coords);
            provider.PressMouseButton();
            await provider.WaitAsync(buttonDownTimeout);
            provider.ReleaseMouseButton();
        }

    }
}

Reduce the default button down duration to 150 ms.
Reduce the default button down duration to 150 ms.
