Player12
An open source football management simulator
Loading...
Searching...
No Matches
SwipeTuning Struct Reference

Thresholds of the sideways swipe, in mouse-wheel units. More...

#include <swipe_gesture.h>

Public Attributes

float threshold = 10.0f
 
float slop = 1.5f
 
float dominance = 2.0f
 
std::uint64_t idle_ns = 200'000'000
 

Detailed Description

Thresholds of the sideways swipe, in mouse-wheel units.

SDL reports touchpad scrolling in logical units that do not depend on the output scale (on Wayland one unit is about ten surface pixels of finger travel), so the same numbers hold on HiDPI screens.

Member Data Documentation

◆ dominance

float SwipeTuning::dominance = 2.0f

Sideways travel must exceed vertical travel by this factor.

◆ idle_ns

std::uint64_t SwipeTuning::idle_ns = 200'000'000

A pause this long between samples ends the gesture.

◆ slop

float SwipeTuning::slop = 1.5f

Travel after which the gesture's direction is decided.

◆ threshold

float SwipeTuning::threshold = 10.0f

Sideways travel for one step.


The documentation for this struct was generated from the following file: