Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

ControlP5 Draw over a Button

$
0
0

I try to use a messagebox if the mouse over some elements. But the Elements of cp5 are every time in foreground. How can I draw a rect over the buttons?

See like this:

import controlP5.*;

ControlP5 cp5;

void setup() {
  size(400, 600);
  cp5 = new ControlP5(this);
  cp5.addButton("A")
    .setValue(0)
    .setPosition(100, 100)
    .setSize(200, 19)
    ;
}

void draw() {
  background(120);
  rect(mouseX, mouseY, 40, 100);
}

Viewing all articles
Browse latest Browse all 2896

Trending Articles