示例#1
0
        public static ActionPopupWindow ShowWindow(Vector2 pos, Action onGUI,
                                                   Action onGUITop, Action onGUIBottom, float width = 250, float height = 100)
        {
            ActionPopupWindow window = CreateInstance(typeof(ActionPopupWindow)) as ActionPopupWindow;

            if (onGUI != null)
            {
                window.onGUI = delegate(ref object obj) { onGUI(); }
            }
            ;
            if (onGUITop != null)
            {
                window.onGUITop = delegate(ref object obj) { onGUITop(); }
            }
            ;
            if (onGUIBottom != null)
            {
                window.onGUIBottom = delegate(ref object obj) { onGUIBottom(); }
            }
            ;
            window.width  = width;
            window.height = height;
            window.Init(pos);
            return(window);
        }
示例#2
0
        public static ActionPopupWindow ShowWindow(Rect rect, object startValue, float width = 250, float height = 100)
        {
            ActionPopupWindow window = CreateInstance(typeof(ActionPopupWindow)) as ActionPopupWindow;

            window.variable = startValue;
            window.width    = width;
            window.height   = height;
            window.Init(rect);
            return(window);
        }
示例#3
0
        public static ActionPopupWindow ShowWindow(Vector2 pos, object startValue, ActionRef <object> onGUI, float width = 250, float height = 100)
        {
            ActionPopupWindow window = CreateInstance(typeof(ActionPopupWindow)) as ActionPopupWindow;

            window.variable = startValue;
            window.onGUI    = onGUI;
            window.width    = width;
            window.height   = height;
            window.Init(pos);
            return(window);
        }
示例#4
0
        public static ActionPopupWindow ShowWindow(Rect rect, object startValue, ActionRef <object> onGUI,
                                                   ActionRef <object> onGUITop, ActionRef <object> onGUIBottom, float width = 250, float height = 100)
        {
            ActionPopupWindow window = CreateInstance(typeof(ActionPopupWindow)) as ActionPopupWindow;

            window.variable    = startValue;
            window.onGUI       = onGUI;
            window.onGUITop    = onGUITop;
            window.onGUIBottom = onGUIBottom;
            window.width       = width;
            window.height      = height;
            window.Init(rect);
            return(window);
        }
示例#5
0
        public static ActionPopupWindow ShowWindow(Rect rect, Action onGUI, float width = 250, float height = 100)
        {
            ActionPopupWindow window = CreateInstance(typeof(ActionPopupWindow)) as ActionPopupWindow;

            if (onGUI != null)
            {
                window.onGUI = delegate(ref object obj) { onGUI(); }
            }
            ;
            window.width  = width;
            window.height = height;
            window.Init(rect);
            return(window);
        }
示例#6
0
        public static ActionPopupWindow ShowWindow(Rect rect, object startValue, ActionRef <object> onGUI,
                                                   Action onGUITop, Action onGUIBottom, float width = 250, float height = 100)
        {
            ActionPopupWindow window = CreateInstance(typeof(ActionPopupWindow)) as ActionPopupWindow;

            window.variable = startValue;
            window.onGUI    = onGUI;
            if (onGUITop != null)
            {
                window.onGUITop = delegate(ref object obj) { onGUITop(); }
            }
            ;
            if (onGUIBottom != null)
            {
                window.onGUIBottom = delegate(ref object obj) { onGUIBottom(); }
            }
            ;
            window.width  = width;
            window.height = height;
            window.Init(rect);
            return(window);
        }