Now whenever you click a tab the cell and some text should show up. The last two work fine as they use no shapes. The third, guard, works as I have commented out the PShape section. I have the images in the right directory on the server and have tried placing them in the sketches root directory and pointing to them but that wont work either.
I was wondering which of the options for creating custom shapes was quicker? Does anyone know whether loading an SVG file is faster or slower than creating a custom shape that would require a mixture of curves, concave and convex lines?
The reason I ask is because I'm going to be performing a technical evaluation of a project I have done and was interested to see which is best. Below is an example of the kind of thing I'll be creating:
I'm having some trouble with a class of mine. I'm trying to create a class to create controlP5 text areas. I'm getting a constructor is undefined error.
I've had a look at
this and have tried to implement that but I'm guessing I've messed with it. I've been stuck on this for hours now and it's driving me mad. Any ideas?
Class:
class TextArea{
Textarea area;
String name, data, tabName;
int x,y,width,height;
TextArea(PApplet pa, Textarea _area, String _name, String _data, String _tabName, int _x, int _y, int _width, int _height){
area = _area;
name = _name;
data = _data;
x = _x;
y = _y;
width = _width;
height = _height;
}
void display(){
area = cp5.addTextarea(name,data,x,y,width,height);
area.moveTo(tabName);
area.setColor(0x00000000);
}
}
Call:
TextArea testText = new TextArea(this,testText,"testTextArea","This is the test text","animal",10,50,100,100);
It happens when I click the button. It didn't happen when the button weren't created using the class. I thought it was maybe because tabs and buttons had the same name but changing that didn't fix it.
Button code:
/*
** biology button handler
*/
public void biology(){
// debugging
println("biology");
baseSet("bio");
cp5.tab("biology").setActive(true);
}
/*
** chemistry button handler
*/
public void chemistry(){
baseSet("chem");
cp5.tab("chemistry").setActive(true);;
}
/*
** physics button handler
*/
public void physics(){
baseSet("phys");
cp5.tab("physics").setActive(true);
}
Class code:
class myButton{
String buttonName,name;
int alph,x,y,width,height,colour,topMargin;
ControlFont font;
Button button;
myButton(Button _button, String _name, int _alph, int _x, int _y, int _width, int _height, int _colour, int _topMargin, ControlFont _font){
I'm trying to make a class to create controlP5 tabs however the way I have done it throws a null pointer exception. It's on line 39 that the exception occurs. Anyone have any ideas on what I'm doing wrong?
I'm wondering if there is a way to position the label on a controlP5 tab. I've had a look through the documentation and I can't seem to find anything. Does anyone know if there is a way to do this?
I'm going to be creating a few applications that will have a menu system. I was just wondering what is the best way to create this type of application?
I've never created anything like this before so have no idea which would be the best way to implement the functionality that would allow users to use the menu, run the animations then return to the menu and visit other animations.
I'm doing my dissertation project on the creation of a Processing teaching tool. I'm fine with the code (so far) but was wondering if anyone could point me in the direction of any academic papers on Processing. I've been looking for a while now but still haven't managed to find anything. Any help would be much appreciated.