public void setTool(int type, int tool, String tstr, int tval){
		 //(0= state draw, 1 = state fill, 2 = cell draw, 3 = cell fil)
		 switch(type){
			 case 0: sdt = tool; toolstring[0] = tstr; break;
			 case 1: sft = tool; toolstring[1] = tstr; break;
			 case 2: cdt = tool; toolstring[2] = tstr; break;
			 case 3: cft = tool; toolstring[3] = tstr; break;
		 }
		  /*Tools
			  * 0 = default
			  * 1 = option tool
			  * 2 = parameter tool
			  */
		 switch(tool){
			 case 0: break;
			 case 1: if(tval < 1){opval[type] = false;}else{opval[type] = true;}break;
			 case 2: paramval[type] = tval; break;
		 }
	 }