Untangle: add cursor control interface.

The cursor keys navigate amongst the points. CURSOR_SELECT toggles dragging;
CURSOR_SELECT2 and the Tab key cycle through the points.

The cursor navigation scheme jumps to the nearest point within the quadrant
of the cursor direction; this seems to yield fairly intuitive gameplay.
Unfortunately, the "quadrant-nearest-neighbors" digraph produced by this
scheme is not necessarily fully reciprocal; that is, pressing opposite
cursor keys in sequence does not always return to the original point. There
doesn't seem to be any immediately obvious way around this.

As for connectivity (i.e. whether all points are reachable from any given
point), I could not find a counterexample, but I don't yet have a formal
proof that this is the case in general. Hence, I've added the ability to
cycle through all the points with Tab. (This will probably also be useful
in conjunction with the "Numbers" point drawing preference.)
This commit is contained in:
Franklin Wei
2024-07-21 05:32:09 -04:00
committed by Simon Tatham
parent b50a95807a
commit c010ca122f
2 changed files with 240 additions and 10 deletions

View File

@ -1586,6 +1586,11 @@ I originally saw this in the form of a Flash game called \i{Planarity}
To move a point, click on it with the left mouse button and drag it
into a new position.
The cursor keys may also be used to navigate amongst the
points. Pressing the Enter key will toggle dragging the
currently-highlighted point. Pressing Tab or Space will cycle through
all the points.
(All the actions described in \k{common-actions} are also available.)
\H{untangle-parameters} \I{parameters, for Untangle}Untangle parameters