// Define and create image button
PImage b = loadImage("base.gif");
PImage r = loadImage("roll.gif");
PImage d = loadImage("down.gif");
int x = width/2 - b.width/2;
int y = height/2 - b.height/2;
int w = b.width;
int h = b.height;
button = new ImageButtons(x, y, w, h, b, r, d);
}
ImageButtons(int ix, int iy, int iw, int ih, PImage ibase, PImage iroll, PImage idown)
{
x = ix;
y = iy;
w = iw;
h = ih;
base = ibase;
roll = iroll;
down = idown;
currentimage = base;
}