#include <ClickDetector.h>
Public Types | |
enum class | ClickEvent { Nil , Down , Up } |
enum class | ClickOutcome { Nil , Move , Click , Release } |
The type of mouse click. More... | |
Public Member Functions | |
ClickOutcome | DetectClick (ClickEvent clickEvent, const ScreenVector &cursorDelta) |
Called from any type of 'handle event' function. | |
void | SetDoubleClickInterval (float doubleClickInterval) |
void | SetDeadZone (float deadZone) |
Override the dead zone before a 'move' outcome will be triggered. | |
void | OverrideTimeNowFn (AZStd::function< AZStd::chrono::milliseconds()> timeNowFn) |
void | SetClickDownEventFn (AZStd::function< void()> downEventFn) |
Customization point for when a potential click first begins. | |
Utility class to help detect different types of mouse click (mouse down and up with no movement), mouse move (down and initial move after some threshold) and mouse release (mouse down with movement and then mouse up).
|
strong |
Internal representation of click event (map from external event for this when calling DetectClick).
|
strong |
void AzFramework::ClickDetector::OverrideTimeNowFn | ( | AZStd::function< AZStd::chrono::milliseconds()> | timeNowFn | ) |
Override how the current time is retrieved. This is helpful to override when it comes to simulating different passages of time to avoid double click issues in tests for example.
|
inline |
Override the default double click interval.