TouchControls

from acron.touch import TouchControls
class TouchControls(base=None, *, scale: float = 1.0, authored_height: float = 1080.0, font=None, left_column=(), right_column=(), stick_labels: tuple[str, str] = ('DRIVE', 'LOOK'), look_x: float = 17.0, look_y: float = 14.0, look_floor: float = 0.06, palette=None)

Bases: object

The overlay, its geometry, and the state an input layer reads.

The duck type consumers read: active, lx/ly/rx/ry, held, edges, end_frame() and the three look constants — so a test can drive the whole layer with a pointer and no window at all, which is the only way it can be tested on an engine with no touch events to synthesise.

left_column/right_column are (action, caption[, wide]) tuples, top to bottom (the order is authored); look_x/look_y are the rates the right stick feeds a look, look_floor the magnitude below which the operator is not aiming.

Inheritance diagram

digraph inheritance8eb4d13e77 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "TouchControls" [URL="acron.touch.TouchControls.html#acron.touch.TouchControls",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="The overlay, its geometry, and the state an input layer reads."]; }
property lx: float
property ly: float
property rx: float
property ry: float
property thumb_zone: float

How much of the bottom of the screen the sticks and their columns own. Lift the interface by exactly this much while they are up: the instrument cluster moves off the bottom edge, because that is where a thumb sits.