Disable one GUI Button with my Mouse Scroll Wheel?

Hello Everyone,

I’m trying to disable one GUI Button with my Mouse Scroll Wheel “when is spinning”,

Now I can disable the button with the forward rotation wheel, but not with the to back rotation wheel.

Please any advice is more than welcome!

    function OnGUI(){
    if (Input.GetAxis("Mouse ScrollWheel") < 0){
    button = false;
    	}else{
    button = true;
	}
    
    if (Input.GetAxis("Mouse ScrollWheel") > 0){
    button = false;
    	}else{
    button = true;
    }

Did you try to do this in only one test statement :

if (Input.GetAxis("Mouse ScrollWheel") < 0 || Input.GetAxis("Mouse ScrollWheel") > 0)
      button = false;
else
      button = true;

EDIT : With Bunny answer ==>

if (Input.GetAxis("Mouse ScrollWheel") == 0)
      button = true;
else
      button = false;

And with real Bunny answer which as the same result than others :

button = (Input.GetAxis("Mouse ScrollWheel") == 0;