class hslider { float minvalue, maxvalue; int w, h; float currvalue; float multi; int currint; boolean over = false, drag = false; int x, y; String slidername; hslider(String n, int px, int py, float c, float mi, float ma) { minvalue = mi; maxvalue = ma; currvalue = c; w = 100; h = 10; x = px; y = py; multi = (ma-mi)/w; currint = int(( (c-mi)/(ma-mi) ) * w); slidername = n; } void draw() { pushMatrix(); translate(x,y); noStroke(); if(over) fill(200,50,0); else fill(150,50,0); rect(0,0,w,h); if(over) fill(250,50,0); else fill(200,50,50); rect(0,0,currint,h); noFill(); stroke(255,50); rect(0,0,w,h); fill(255); text(slidername,w+10,7); popMatrix(); } void check() { int d = 5; over = (mouseX>=x-d && mouseX<=x+w+d && mouseY>=y-d && mouseY<=y+h+d) ? true : false; if(over && !drag && mousePressed) { drag = true; } if(drag) { currint = mouseX-x; if(currint > w) currint = w; else if(currint<0) currint = 0; currvalue = minvalue + currint * multi; if(!mousePressed) { drag = false; } } } } class menubutton { int x, y, w, h; String buttonname; boolean over = false, activ = false; menubutton(int px, int py, String n) { x = px; y = py; w = 80; buttonname = n; h = 15; } void check() { int d = 5; over = (mouseX>=x-d && mouseX<=x+w+d && mouseY>=y-d && mouseY<=y+h+d) ? true : false; } void draw() { pushMatrix(); translate(x,y); noStroke(); if(activ) { if(over) fill(255,100,0); else fill(255,50,0); } else { if(over) fill(200,50,0); else fill(200,60,50); } rect(0,0,w,h); fill(255); text(buttonname,5,h-5); popMatrix(); } } void mouseReleased() { if(playing) { if(b_pause.over) { playing = false; b_play.activ = true; b_pause.activ = false; } } else { if(parameters) { for(int i=0; i