}
if (lastPressed != null && triangleOnSelected)
{
MenuItem i = lastPressed;
PGraphics pg = canvas.g;
int alpha = (int) (menu.alpha * 255);
Color c = menu.style.strokeColor;
pg.fill(menu.canvas.color(c.getRed(), c.getGreen(), c.getBlue(),
alpha));
float height = i.getWidth() / 8;
switch (rotation.rot)
{
case (LEFT):
float cy = i.getY() + i.getHeight() / 2;
float cx = inset + menu.style.padX;
pg.triangle(cx, cy + height, cx, cy - height, cx + height,
cy);
i.setPosition(i.getX() + height, i.getY());
break;
case (RIGHT):
cy = i.getY() + i.getHeight() / 2;
cx = canvas.width - inset - menu.style.padX;
pg.triangle(cx, cy + height, cx, cy - height, cx - height,
cy);
i.setPosition(i.getX() - height, i.getY());
break;
case (TOP):
cy = inset + menu.style.padY;
cx = i.getX() + i.getWidth() / 2;
pg.triangle(cx + height, cy, cx - height, cy, cx, cy
+ height);
i.setPosition(i.getX(), i.getY() + height);
break;
case (BOTTOM):
cy = canvas.width - inset - menu.style.padY;
cx = i.getX() + i.getWidth() / 2;
pg.triangle(cx + height, cy, cx - height, cy, cx, cy
- height);
i.setPosition(i.getX(), i.getY() - height);
break;
}
}