@Override
	public void updateWith(InputProxy input) {
		if (input.isTouched()) {
			// If the input is touched, we were previously not touching, and
			// the touch is within the button then press the button.
			if (hasReleasedTouch && checkInput(input.getX(), input.getY()))
				press();
			// Because the input is touched, we have definitely released the button.
			hasReleasedTouch = false;
		} else {
			// If the input is not touched but was previously touched and
			// the button is pressed, release the button.
			if (!hasReleasedTouch && pressed)
				release();
			// Because the input is not touched, we have definitely released the button.
			hasReleasedTouch = true;
		}
	}