ztk::game pointers
Gives the pointer and the fingers on the view as a list of dicts.
ztk::game pointers
Description
Each dict has the keys id, x, y, and state. The id 0 is the mouse, and a finger has the id 1 or more. The point is in logical pixels of the view. STATE is pressed in the first step of a press, held later, and released in the step after the release, once. The game sees the input from its first call of ztk::game. Text input stays with the Tk widgets.
Returns
A list of dicts.
Examples
% wm geometry . 200x100
> ztk::game loop -update {}
> update
> event generate . <ButtonPress-1> -x 30 -y 40
> ztk::game step
> ztk::game pointers
{id 0 x 30.0 y 40.0 state pressed}
Errors
% ztk::game pointers now
wrong # args: should be "ztk::game pointers"
-errorcode TCL WRONGARGS
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.7