Changes

Jump to: navigation, search

QFunction

110 bytes added, 09:14, 2 February 2018
Check-Box Function
<pre>
// x-Position, y-Position, Qusetion-Nr, Checkbox-Number, Answer-Value, Text-1-Line, Text-3-Linefunction cBox(cX, cY, qN, cN, cA, cT1, cT2){
if( (mouseIsPressed)&&(mouseUp == 0) ){
if( (mouseX>cX-150)&&(mouseX<cX+150)&&(mouseY>cY)&&(mouseY<cY+40) ){
mouseUp = 1;
if(cList[qN-1][cN-1] == 0undefined){ cList[qN-1][cN-1] = 1cA;
}else{
cList[qN-1][cN-1] = 0undefined;
}
}
}
 
if(mouseIsPressed == false){
textAlign(LEFT);
textSize(18);
textStyle(NORMAL);
if(cT2 == ""){
noFill();
ellipse(cX - 130, cY+20, 25, 25);
if(cList[qN-1][cN-1] !== 1undefined){
fill(20);
ellipse(cX - 130, cY+20, 15, 15);
<br>
 
== Beispiel Code ==

Navigation menu