#include <ttx/mouse_click_tracker.h>
|
using | Duration = dius::SteadyClock::Duration |
|
using | TimePoint = dius::SteadyClock::TimePoint |
|
◆ Duration
◆ TimePoint
◆ MouseClickTracker()
ttx::MouseClickTracker::MouseClickTracker |
( |
u32 | max_clicks, |
|
|
Duration | threshold = di::chrono::Milliseconds(200) ) |
|
inlineexplicit |
◆ track()
auto ttx::MouseClickTracker::track |
( |
MouseEvent const & | event, |
|
|
TimePoint | now = dius::SteadyClock::now() ) -> u32 |
Track a mouse event and return the number of consecutive clicks.
- Returns
- The number of consecutive clicks
This functions returns 0 for non-click mouse events. So to track double clicks, look for a return value of 2.
The documentation for this class was generated from the following files: