Search in sources :

Example 1 with FingerDragging

use of spacegraph.input.finger.FingerDragging in project narchy by automenta.

the class CameraSensorView method updateTouch.

@Override
public void updateTouch(Finger finger) {
    super.updateTouch(finger);
    if (finger == null) {
        touchConcept = null;
    } else {
        touchConcept = cam.get(touchPixel.x, cam.height - 1 - touchPixel.y);
    }
    if (finger.clickedNow(OPEN_CONCEPT_BUTTON, this)) {
        Scalar c = this.touchConcept;
        if (c != null)
            Vis.conceptWindow(c, nar);
    }
    finger.tryFingering(new FingerDragging(0) {

        @Override
        protected boolean drag(Finger f) {
            updateTouch(finger);
            Scalar c = touchConcept;
            if (c != null)
                onTouch(touchConcept);
            return true;
        }
    });
}
Also used : Finger(spacegraph.input.finger.Finger) Scalar(nars.concept.scalar.Scalar) FingerDragging(spacegraph.input.finger.FingerDragging)

Aggregations

Scalar (nars.concept.scalar.Scalar)1 Finger (spacegraph.input.finger.Finger)1 FingerDragging (spacegraph.input.finger.FingerDragging)1