Disable the GUI when the character moving (89495)

Hai everyone, i already make the player character to move to it is destination (animate the character to move to that destination), i wanted to disable the GUI button when the player character is moving, but i can’t get it and work it out. Could you guys help me?

Here is the code:

public class UserPlayer : Player 
{
	public override void TurnUpdate()
	{
		//Moving animation
		if (positionQueue.Count > 0) 
        {
                    GUI.enabled = false; // This is the one that i want when the character still moving (animation still moving), disabled the GUI. But i can't get it
			transform.position += (positionQueue[0] - transform.position).normalized * moveSpeed * Time.deltaTime;
			
			if (Vector3.Distance(positionQueue[0], transform.position) <= 0.1f) 
            {
				transform.position = positionQueue[0];
				positionQueue.RemoveAt(0);

				if (positionQueue.Count == 0) 
                {
					actionPoints--;
				}
			}
		}
		
		base.TurnUpdate();
	}
	
	public override void TurnOnGUI() 
    {
        base.TurnOnGUI();
	}
}

public class Player : MonoBehaviour 
{
//movement animation
    public List<Vector3> positionQueue = new List<Vector3>();

public virtual void TurnUpdate()
    {
		if (actionPoints <= 0) 
        {
			actionPoints = 2;
            magicAttacking = false;
			moving = false;
			attacking = false;			
			GameManager.instance.NextTurn();
		}
	}

     public virtual void TurnOnGUI()
      {
        if (GameManager.instance.currentPlayerIndex == 0 || GameManager.instance.currentPlayerIndex == 2)
        {
            //ToolTip Text
    move = GUI.Button(buttonRect, new GUIContent("Move", "Move the Player"));
    GUI.Label(tooltipRect, GUI.tooltip, label1);

    GUI.tooltip = null;

    //Move Button
    if (move)
    {
        if (!moving)
        {
            GameManager.instance.RemoveTileHighlights();
            moving = true;
            attacking = false;
            GameManager.instance.HighlightTilesAt(gridPosition, Color.blue, movementPerActionPoint);
        }

        else
        {
            moving = false;
            attacking = false;
            GameManager.instance.RemoveTileHighlights();
        }
    }
        }

Thank you

declare a bool under your class and true it when the character is moving and add this code(you will have to false the bool when the character is stopped moving too):

if(isOnMove)
{
move = GUI.Button(buttonRect, new GUIContent("Move", "Move the Player"));
    GUI.Label(tooltipRect, GUI.tooltip, label1);
}

you are making it a lot more complicated than it needs to be, do it like that ;
create a bool var, it get false when the player is moving (obviously when there is an input key down)
and you draw your gui when that variable is true