Beispiel #1
0
  public void keyPressed() {
    if (key == '-') {
      targetZoom = max(targetZoom - 0.1f, 0.5f);
    }
    if (key == '=') {
      targetZoom = min(targetZoom + 0.1f, 1.9f);
    }
    if (key == 'l') {
      showLabels = !showLabels;
    }
    if (key == 'k') {
      if (useKeyboard == false) {
        useKeyboard = true;
      } else {
        useKeyboard = false;
      }
    }
    /// switches video
    if (key == 't') {

      thePopUp.videoCounter++;
      if (thePopUp.videoCounter >= thePopUp.videoPath.size()) {
        thePopUp.videoCounter = 0;
        // println("COUNTER: " + videoCounter + " " + videoPaths[videoCounter]);
      }
      thePopUp.switchCurVideo(thePopUp.videoCounter);
    }
    /// play video
    if (key == 'p') {

      thePopUp.isVideoPlaying = true;
      thePopUp.startVideo();
    }
    /// swap video
    if (key == 's') {

      thePopUp.isVideoPlaying = false;
      thePopUp.stopVideo();
    }
  }