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.
IndexProgramming Questions & HelpSyntax Questions › How to display int value of a y axis
Page Index Toggle Pages: 1
How to display int value of a y axis (Read 604 times)
How to display int value of a y axis
Dec 14th, 2009, 4:21pm
 
I have a slider whereby i am monitoring the y axis and when mouse is clicked, the slider can be dragged up and down between 0 - 255. This slider changes an external device but i think it would be useful to display what number value it is at as its being dragged up and down.

I tried using text(mouseY,1,1); but it did nothing

Re: How to display int value of a y axis
Reply #1 - Dec 14th, 2009, 6:24pm
 
its working fine. maybe you see where your problem is when you look at my sketch. you probably miss something.
PFont font;
void setup(){
size(500, 500, P3D);
font = createFont("Arial",22);
textFont(font);
}

void draw(){
background(0);
text(mouseX, mouseX,height/2);
}
Re: How to display int value of a y axis
Reply #2 - Dec 14th, 2009, 6:39pm
 
thanks got it working

Grin
Page Index Toggle Pages: 1