求助:processing中ControlP5库如何添加按钮属性
下面是改了例程中的代码,运行没有问题,现在想添加隐藏属性如何实现:import controlP5.*;
ControlP5 cp5;
void setup() {
size(400,600);
noStroke();
cp5 = new ControlP5(this);
// create a new button with name 'buttonA'
cp5.addButton("colorA")
.setValue(0)
.setPosition(100,100)
.setSize(200,19)
;
}
void draw() {
}
public void colorA(int theValue) {
println("a button event from colorA: "+theValue);
//在这里加上隐藏按钮的语句(说明文档中这句代码如何实现隐藏controlP5.Controller : Button hide() )
}
/*
下面是说明文档
a list of all methods available for the Button Controller
use ControlP5.printPublicMethodsFor(Button.class);
to print the following list into the console.
You can find further details about class Button in the javadoc.
Format:
ClassName : returnType methodName(parameter type)
*
*
*
controlP5.Controller : Button hide()
*
*
*
*/
页:
[1]