if inside if statement

here is what i am trying to do

i have rotation on mouse click and drag, i want to prevent that if mouse is inside rectangle that represents part of the gui (as a window), it works fine but for windows it prevents click+rotation even if the window is not shown, so i am trying to add one more variable to check, here is what i tried:

if(Input.GetMouseButton(0) && !(GUIControlScript.GetOptionsRectangle().Contains(invertedMousePosition)))){

    enableSelection=false;
    toggleSelection=false;

    x += Input.GetAxis("Mouse X") * xSpeed * 0.04; 
    y -= Input.GetAxis("Mouse Y") * ySpeed * 0.04; 
}

so this basically means : if mouse button is clicked and mouse is not inside window rectangle go inside. the question is how to add one more check if the window is visible? GUIControlScript.showWindow variable?

thanks!

To add another check you would simply do as you have already done within your if statement. In most programming languages with logical structures `&&` is AND and `||` is OR and `!` is NOT. To write something in English like "if something and not something else and not one more thing and ..., do something" would be:

if(something && !somethingElse && !onMoreThing && ...) {
    doSomething();
}