public void update() 
	{
		if(vert && selected)
		{
			y=mouseY - (height / 2);
			if(y<min){y=min;}
			else if(y+height>max){y=max-height;}
			displacement = (y-min)*ratio;
		} 
		else if(!vert && selected)
		{
			x=mouseX - (width / 2);
			if(x<min){x=min;}
			else if(x+width>max){x=max-width;}
			displacement = (x-min)*ratio;
		}
	}