Get status of GUI button

I want it when your finger is on the button, i want the variable to be true, and when its not, i want it to be false. But GUI button is a click function so it just is a trigger not a boolean. What do i do to make it true if finger is there, and false if it is not. Idk if it will help but here is my OnGUI function

function OnGUI(){
	GUI.Label(Rect(15, 15, 32, 32), planeCrash.rings.ToString(), Style);
	if(GUI.Button(Rect(Screen.width*0.9, Screen.height*0.9, 100, 50), buttonRight, Style)){
		yaw = 75;
		animator.SetBool("yawRight", true);
		rightButton = true;
	}else{
		animator.SetBool("yawRight", false);
		rightButton = false;
	}
	if(GUI.Button(Rect(Screen.width*0.1, Screen.height*0.9, 100, 50), buttonLeft, Style)){
		yaw = -75;
		animator.SetBool("yawLeft", true);
		leftButton = true;
	}else{
		animator.SetBool("yawLeft", false);
		leftButton = false;
	}
	if(leftButton == false && rightButton == false){
		yaw = 0;
		animator.SetBool("yawLeft", false);
		animator.SetBool("yawRight", false);	
	}
}

There are some solutions of your problem. The first, it to use GUI.tooltip and GUIContent. I will write a small example:

 function OnGUI(){
  GUI.Label(Rect(15, 15, 32, 32), planeCrash.rings.ToString(), Style);
  GUI.Button(Rect(Screen.width*0.9, Screen.height*0.9, 100, 50), GUIContent(buttonRight, "button1"), Style);
  GUI.Button(Rect(Screen.width*0.1, Screen.height*0.9, 100, 50), GUIContent(buttonLeft, "button2"), Style);
  var lastTooltip : String = GUI.tooltip;
  if(lastTooltip == "button1") {
   yaw = 75;
   animator.SetBool("yawRight", true);
   rightButton = true;
  } else if(lastTooltip == "button2") {
   yaw = -75;
   animator.SetBool("yawLeft", true);
   leftButton = true;
  } else {
   yaw = 0;
   animator.SetBool("yawRight", false);
   rightButton = false;
   animator.SetBool("yawLeft", false);
   leftButton = false;
  }
 }

The second way, it to use Events. The example is lower:

 function OnGUI(){
  GUI.Label(Rect(15, 15, 32, 32), planeCrash.rings.ToString(), Style);
  var button1Rect: Rect = new Rect(Screen.width*0.9, Screen.height*0.9, 100, 50);
  var button2Rect: Rect = new Rect(Screen.width*0.1, Screen.height*0.9, 100, 50);
  GUI.Button(button1Rect, buttonRight, Style);
  GUI.Button(button2Rect, buttonLeft, Style);
  if(Event.current.type == EventType.Repaint) {
   if (button1Rect.Contains(Evenr.current.mousePosition)) {
    yaw = 75;
    animator.SetBool("yawRight", true);
    rightButton = true;
   } else if(button2Rect.Contains(Evenr.current.mousePosition)) {
    yaw = -75;
    animator.SetBool("yawLeft", true);
    leftButton = true;
   } else {
    yaw = 0;
    animator.SetBool("yawRight", false);
    rightButton = false;
    animator.SetBool("yawLeft", false);
    leftButton = false;
   }
  }
 }

I hope that it will help you.