name
ControllCoolieHat
import processing.opengl.*;

import procontroll.*;
import net.java.games.input.*;

ControllIO controllIO;
ControllDevice joypad;
ControllCoolieHat cooliehat;

float transX;
float transY;

void setup(){
  size(600,600,OPENGL);

  transX = width/2;
  transY = height/2;

  controllIO = ControllIO.getInstance(this);

  joypad = controllIO.getDevice("Logitech RumblePad 2 USB");
  joypad.printButtons();

  cooliehat = joypad.getCoolieHat(0);
  cooliehat.setMultiplier(4);
}

void handleButton1Press(){
  fill(255,0,0);
  joypad.rumble(1);
}

void draw(){
  transX += cooliehat.getX();
  transY += cooliehat.getY();
  
  background(0);
  lights();
  translate(transX,transY,0);
  box(200);
}
description
A cooliehat is a special button, that can be found on joypads for example. It is not only on or of but does also have a direction.
constructors
none available
methods
Use this method to get the actual multiplier.
Returns the name of the input.
Gives you the current value of an input.
The current x value of the cooliehat.
The current y value of the cooliehat.
Plugs a method to handle incoming button events.
This method returns true if the button was pressed.
Use this method to set the actual multiplier.
usage
application
related