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

Buttons with ControlP5

$
0
0

Hello guys,

How can I change the position of a button with controlP5 dynamically after it is created?

We are building an application where the user needs to choose an option (button image), which represents the sequence of a story ...

I need to change the position of these buttons as hits or misses, to continue to the next stage.

I tried as well, but it works ...

void keyPressed(){
  if (key == 'M' || key == 'm' ){
    buttonPosX = buttonPosX + 10;   
    //button01.setPosition(buttonPosX, buttonPoxY);
    controlP5.getController(button01).setPosition(buttonPosX, buttonPoxY);
  }  
}

Thanks in advance for your attention.


Viewing all articles
Browse latest Browse all 2896

Trending Articles