Ejemplo n.º 1
0
        private UnityEngine.UI.Windows.Components.Side GetMode(Layout hMode, Layout vMode)
        {
            UnityEngine.UI.Windows.Components.Side side = UnityEngine.UI.Windows.Components.Side.Bottom;
            switch (vMode)
            {
            case Layout.Min:
                switch (hMode)
                {
                case Layout.Min:
                    side = UnityEngine.UI.Windows.Components.Side.TopLeft;
                    break;

                case Layout.Middle:
                    side = UnityEngine.UI.Windows.Components.Side.Top;
                    break;

                case Layout.Max:
                    side = UnityEngine.UI.Windows.Components.Side.TopRight;
                    break;
                }
                break;

            case Layout.Middle:
                switch (hMode)
                {
                case Layout.Min:
                    side = UnityEngine.UI.Windows.Components.Side.Left;
                    break;

                case Layout.Middle:
                    side = UnityEngine.UI.Windows.Components.Side.Middle;
                    break;

                case Layout.Max:
                    side = UnityEngine.UI.Windows.Components.Side.Right;
                    break;
                }
                break;

            case Layout.Max:
                switch (hMode)
                {
                case Layout.Min:
                    side = UnityEngine.UI.Windows.Components.Side.BottomLeft;
                    break;

                case Layout.Middle:
                    side = UnityEngine.UI.Windows.Components.Side.Bottom;
                    break;

                case Layout.Max:
                    side = UnityEngine.UI.Windows.Components.Side.BottomRight;
                    break;
                }
                break;
            }

            return(side);
        }
Ejemplo n.º 2
0
        private void GetMode(UnityEngine.UI.Windows.Components.Side side, out Layout hMode, out Layout vMode)
        {
            hMode = Layout.Max;
            vMode = Layout.Max;

            switch (side)
            {
            case UnityEngine.UI.Windows.Components.Side.Bottom:
                hMode = Layout.Middle;
                vMode = Layout.Max;
                break;

            case UnityEngine.UI.Windows.Components.Side.Left:
                hMode = Layout.Min;
                vMode = Layout.Middle;
                break;

            case UnityEngine.UI.Windows.Components.Side.Right:
                hMode = Layout.Max;
                vMode = Layout.Middle;
                break;

            case UnityEngine.UI.Windows.Components.Side.Top:
                hMode = Layout.Middle;
                vMode = Layout.Min;
                break;

            case UnityEngine.UI.Windows.Components.Side.Middle:
                hMode = Layout.Middle;
                vMode = Layout.Middle;
                break;

            case UnityEngine.UI.Windows.Components.Side.BottomLeft:
                hMode = Layout.Min;
                vMode = Layout.Max;
                break;

            case UnityEngine.UI.Windows.Components.Side.BottomRight:
                hMode = Layout.Max;
                vMode = Layout.Max;
                break;

            case UnityEngine.UI.Windows.Components.Side.TopLeft:
                hMode = Layout.Min;
                vMode = Layout.Min;
                break;

            case UnityEngine.UI.Windows.Components.Side.TopRight:
                hMode = Layout.Max;
                vMode = Layout.Min;
                break;
            }
        }