Language \ Environment \ Libraries \ Comparison  
   
Back  
   
  Reference for Processing (BETA) version 88+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

geinerButtonEvent()

   
Examples  
// Example button callback function
 
import processing.gainer.*;

Gainer gainer;
void setup(){
  size(200,200);
  gainer = new Gainer(this);
}

void draw(){
  background(0);
  rect(20,20,160,160);
}

//if you want get buttonEvent on callback function
void gainerButtonEvent(boolean bt){
  if(bt){
    fill(255,0,0);
  }else{
    fill(0,0,255);
  }
}
 

Description   Called when button is pressed and released.
   
Syntax  
void gainerButtonEvent(button) {
  statements
}
   
Parameters  
button   boolean: true: button Pressed and false: button Released

statements   any valid statements

   
Usage   Application
   
Related   buttonPressed
 
 






   
 
Updated: Sat May 7 09:43:17 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info