Skip to content

UserInputProcessor: add DoubleClickBenchmark() #4379

@swharden

Description

@swharden

Presently there's Enable() and Disable() but it would be nice to have DoubleClickBenchmark(bool enable) since this is such a common task. Perhaps even benchmarking should be disabled by default because I could see it sneaking into some deployed apps without the developer realizing that functionality exists.

This works now, but it's really complicated 😓

// disable double-click benchmark
formsPlot1.UserInputProcessor.RemoveAll<ScottPlot.Interactivity.UserActionResponses.DoubleClickBenchmark>();
// re-enable double-click benchmark
var button = ScottPlot.Interactivity.StandardMouseButtons.Left;
var response = new ScottPlot.Interactivity.UserActionResponses.DoubleClickBenchmark(button);
formsPlot1.UserInputProcessor.UserActionResponses.Add(response);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions