We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 ... 6 7 8 9 10 ... 17
controlP5 (Read 126735 times)
Re: controlP5
Reply #105 - Nov 14th, 2008, 10:56pm
 
Hello CP5 processers. First of all, big up to sojamo for this great library.

So I was running around topics and documentations and I was wondering if // how you can set the position of any component after they are created (well any componant which is created with position informations). In other words, can I change the position or the size of a CP5 object once it is instantiated?

Wether I was missing something or it was not something that somebody needed, but yet, here I am...

Thanks
Re: controlP5
Reply #106 - Nov 14th, 2008, 11:18pm
 
Code:

import controlP5.*;

ControlP5 cp5;

void setup ()
{
cp5 = new ControlP5( this );

Slider s = cp5.addSlider( "test", 0, 200, 200, 200, 200, 20 );
s.position().x = 10;
s.position().y = 10;
}


F
Re: controlP5
Reply #107 - Nov 15th, 2008, 12:55am
 
Thanks, I knew it was something I was missing.

But try this ;
Code:

import controlP5.*;
   Button b = cp5.addButton( "test", 0, 200, 200, 200, 200, 20 );
   b.position().x = 10;
   b.position().y = 10;
}

And now the type Button is ambiguous. I can't figure out why.
Re: controlP5
Reply #108 - Nov 15th, 2008, 8:54am
 
it overlaps with another type of Button i guess "java.awt.Button". try this:

controlP5.Button b = ...

F
Re: controlP5
Reply #109 - Nov 15th, 2008, 12:45pm
 
It worked like a charm.
Regards !
Re: controlP5
Reply #110 - Nov 16th, 2008, 12:11am
 
sojamo, thnks for the great library...

i placed my conrtollers in draw over a 3d scene and I am getting the controller infos comments questions text cycling in my processing compiler thingy cycling through each draw loop - is that ok? is there a way around it?
Re: controlP5
Reply #111 - Nov 16th, 2008, 9:19am
 
you only see that if you have the "new ControlP5(this);" in draw(). this is bad style since you recreate a new object every redraw. you should not have to put anything into draw for controlP5 ..

F
Re: controlP5
Reply #112 - Nov 17th, 2008, 1:50am
 
yeah, i had no idea that controlp5 managed everything nicely not to interfere with my 3d scene - had it originally in setup but then moved it down to draw under  a call to the camera() function - thought I needed to do this to make a 2d overlay, but apparently it does all that on its own.

Thanks for the help
Re: controlP5
Reply #113 - Nov 17th, 2008, 5:48am
 
Maybe I'm missing something, but I can't seem to find a good way to select a single item in a scrollList and have it remain highlighted.

Using setActive makes the most sense, but it throws an error. I can also change the background color manually in the controlEvent, but then I have to go back and turn off all of the other items in the list that may have already been clicked.

Is there an easier way?
Re: controlP5
Reply #114 - Nov 17th, 2008, 9:07am
 
there is no easier way yet. will work something out, thanks for the hint. will post an update soon.
best,
andreas
Re: controlP5
Reply #115 - Nov 17th, 2008, 9:52am
 
Thanks for the quick response and thanks for the fantastic library. I look forward to the update.

Regards,
Scott

sojamo wrote on Nov 17th, 2008, 9:07am:
there is no easier way yet. will work something out, thanks for the hint. will post an update soon.
best,
andreas

Re: controlP5
Reply #116 - Dec 2nd, 2008, 1:58pm
 
I am using this nice library P5Control, but I have a problem with Buttons to try change styles when I try make instance in a Tab inside a class:

Code simplify is like that:
Code:

class GUI
{
ControlP5 controlP5;

GUI(PApplet _this)
{
controlP5 = new ControlP5(_this);
controlP5.Button playButton =controlP5.addButton("Play",0, 0,0,40,40).setId(1);
}
}


The error:
the type of the right sub-expression, "void", is not assignable to the variable, of "controlP5.Button"
Re: controlP5
Reply #117 - Dec 2nd, 2008, 2:06pm
 
Nothing, I have working it. Just by removing ".set(id)" to add button method.
Re: controlP5
Reply #118 - Dec 7th, 2008, 12:18pm
 
minor update, now version 0.3.5
the labels of some controllers were cut off by a few pixels, this should be fixed now. please let me know if not.
best,
andreas
Re: controlP5
Reply #119 - Dec 12th, 2008, 9:46pm
 
is there any workaround for the smoothed rendering in P3D now? text looks ugly. i've read somewhere that it is related to the rendering of Pimages in P3D? a solution would be very helpful?
best,
ralf
Pages: 1 ... 6 7 8 9 10 ... 17