public void Finalize(Point3D pHand, Point3D pRBody, MyscreenPanel scp) {
   this.addImages();
   boolean click = this.Click((int) pHand.getZ(), (int) pRBody.getZ());
   Point point = new Point((int) pHand.getX(), (int) pHand.getY());
   for (int i = 0; i < buttons.size(); i++) {
     TTAirButton imageT = (TTAirButton) buttons.get(i);
     if (imageT.Contain(point) && click) {
       if (imageT.getType() != 'C') {
         this.Clicked(i, scp);
       }
     } else if (imageT.Contain(point) && !click) {
       if (imageT.getType() != 'S') {
         this.Selected(i, scp);
       }
     } else if (!imageT.Contain(point) && !click) {
       if (imageT.getType() != 'N') {
         this.backNormal(i, scp);
       }
     }
   }
 }
Exemplo n.º 2
0
  public void draw() {
    graphics.clear(0, 0, 0);
    graphics2D.setShaderProgram(graphics2D.getDefaultProgram());
    graphics2D.setWhite();

    onDraw();

    if (Debug.DRAW_USER_SKELETON) {
      graphics2D.switchGameCoordinates(false);
      graphics.bindTexture(null);
      graphics2D.setColor(0.7f, 0, 0, 0.5f);
      Point3D[] points = programController.tracking.getSkeletonPoints();
      if (points != null) {
        for (Point3D point : points)
          if (point != null) {
            // System.out.println(point.getX()+" "+point.getY());
            graphics2D.drawRectCentered(
                (point.getX() / 640f * 2 - 0.5f), (-point.getY() / 480f * 2 + 0.5f), 0.1f);
          }
      }
    }
  }