/// <summary> /// Clickeds the inside window. /// </summary> /// <returns><c>true</c>, if inside window was clickeded, <c>false</c> otherwise.</returns> public bool ClickedInsideWindow() { float mouseX = Input.mousePosition.x; float mouseY = Screen.height - Input.mousePosition.y; // Convert mouse coordinates to unity window positions coordinates foreach (OverlayWindow win in windows) { if ((win.Active && AuxFunctions.MouseInWindow(win.GetWindowRect())) || (mouseX < sidebarWidth && mouseY < GUI_SIDEBAR_PADDING_Y + sidebarHeight)) { return(true); } } return(false); }