Forge/Editor/AddDataPopupWindow.cs
/// <summary>
/// Opens the window at the given rect if it is currently closed, or closes the window if it
/// is currently open.
/// </summary>
/// <param name="rect">Where to open the window at.</param>
Opens the window at the given rect if it is currently closed, or closes the window if it
is currently open.
Opens the window at the given rect if it is currently closed or closes the window if it is currently open .
public static void Toggle(Rect rect) {
            if (_enabled && _window != null) {
                _window.Close();
                return;
            }
            if (_window == null) {
                _window = ScriptableObject.CreateInstance<AddDataPopupWindow>();
            }
            const int width = 300;
            const int height = 300;
            rect.y += 3;
            rect.x += (float)((rect.width - width) / 2.0);
            _window.ShowAsDropDown(rect, new Vector2(width, height));
        }
public static void Toggle ( Rect rect ) { if ( _enabled && _window != null ) { _window . Close ( ) ; return ; } if ( _window == null ) { _window = ScriptableObject . CreateInstance < AddDataPopupWindow > ( ) ; } const int width = 300 ; const int height = 300 ; rect . y += 3 ; rect . x += ( float ) ( ( rect . width - width ) / 2.0 ) ; _window . ShowAsDropDown ( rect , new Vector2 ( width , height ) ) ; }
Opens the window at the given rect if it is currently closed, or closes the window if it
is currently open.
Opens the window at the given rect if it is currently closed or closes the window if it is currently open .
rect
Rect
None