Esempio n. 1
0
        public void SetPosition(GraphyManager.ModulePosition newModulePosition)
        {
            float xSideOffset = Mathf.Abs(m_rectTransform.anchoredPosition.x);
            float ySideOffset = Mathf.Abs(m_rectTransform.anchoredPosition.y);

            switch (newModulePosition)
            {
            case GraphyManager.ModulePosition.TOP_LEFT:

                m_rectTransform.anchorMax        = Vector2.up;
                m_rectTransform.anchorMin        = Vector2.up;
                m_rectTransform.anchoredPosition = new Vector2(xSideOffset, -ySideOffset);

                m_audioDbText.alignment = TextAnchor.UpperLeft;

                break;

            case GraphyManager.ModulePosition.TOP_RIGHT:

                m_rectTransform.anchorMax        = Vector2.one;
                m_rectTransform.anchorMin        = Vector2.one;
                m_rectTransform.anchoredPosition = new Vector2(-xSideOffset, -ySideOffset);

                m_audioDbText.alignment = TextAnchor.UpperRight;

                break;

            case GraphyManager.ModulePosition.BOTTOM_LEFT:

                m_rectTransform.anchorMax        = Vector2.zero;
                m_rectTransform.anchorMin        = Vector2.zero;
                m_rectTransform.anchoredPosition = new Vector2(xSideOffset, ySideOffset);

                m_audioDbText.alignment = TextAnchor.UpperLeft;

                break;

            case GraphyManager.ModulePosition.BOTTOM_RIGHT:

                m_rectTransform.anchorMax        = Vector2.right;
                m_rectTransform.anchorMin        = Vector2.right;
                m_rectTransform.anchoredPosition = new Vector2(-xSideOffset, ySideOffset);

                m_audioDbText.alignment = TextAnchor.UpperRight;

                break;

            case GraphyManager.ModulePosition.FREE:
                break;
            }
        }
Esempio n. 2
0
        public void SetPosition(GraphyManager.ModulePosition newModulePosition, Vector2 offset)
        {
            if (newModulePosition == GraphyManager.ModulePosition.FREE)
            {
                return;
            }

            m_rectTransform.anchoredPosition = m_origPosition;

            float xSideOffset = Mathf.Abs(m_rectTransform.anchoredPosition.x) + offset.x;
            float ySideOffset = Mathf.Abs(m_rectTransform.anchoredPosition.y) + offset.y;

            switch (newModulePosition)
            {
            case GraphyManager.ModulePosition.TOP_LEFT:

                m_rectTransform.anchorMax        = Vector2.up;
                m_rectTransform.anchorMin        = Vector2.up;
                m_rectTransform.anchoredPosition = new Vector2(xSideOffset, -ySideOffset);

                break;

            case GraphyManager.ModulePosition.TOP_RIGHT:

                m_rectTransform.anchorMax        = Vector2.one;
                m_rectTransform.anchorMin        = Vector2.one;
                m_rectTransform.anchoredPosition = new Vector2(-xSideOffset, -ySideOffset);

                break;

            case GraphyManager.ModulePosition.BOTTOM_LEFT:

                m_rectTransform.anchorMax        = Vector2.zero;
                m_rectTransform.anchorMin        = Vector2.zero;
                m_rectTransform.anchoredPosition = new Vector2(xSideOffset, ySideOffset);

                break;

            case GraphyManager.ModulePosition.BOTTOM_RIGHT:

                m_rectTransform.anchorMax        = Vector2.right;
                m_rectTransform.anchorMin        = Vector2.right;
                m_rectTransform.anchoredPosition = new Vector2(-xSideOffset, ySideOffset);

                break;

            case GraphyManager.ModulePosition.FREE:
                break;
            }
        }
Esempio n. 3
0
        // TODO: Pending implementation
        public void SetPosition(GraphyManager.ModulePosition newModulePosition)
        {
            switch (newModulePosition)
            {
            case GraphyManager.ModulePosition.TOP_LEFT:

                break;

            case GraphyManager.ModulePosition.TOP_RIGHT:

                break;

            case GraphyManager.ModulePosition.BOTTOM_LEFT:

                break;

            case GraphyManager.ModulePosition.BOTTOM_RIGHT:

                break;
            }
        }
Esempio n. 4
0
        public void SetPosition(GraphyManager.ModulePosition newModulePosition)
        {
            float xSideOffsetBackgroundImage = Mathf.Abs(m_backgroundImages[0].rectTransform.anchoredPosition.x);
            float ySideOffset = Mathf.Abs(m_rectTransform.anchoredPosition.y);

            switch (newModulePosition)
            {
            case GraphyManager.ModulePosition.TOP_LEFT:

                m_rectTransform.anchorMax        = Vector2.one;
                m_rectTransform.anchorMin        = Vector2.up;
                m_rectTransform.anchoredPosition = new Vector2(0, -ySideOffset);


                m_backgroundImages[0].rectTransform.anchorMax        = Vector2.up;
                m_backgroundImages[0].rectTransform.anchorMin        = Vector2.zero;
                m_backgroundImages[0].rectTransform.anchoredPosition = new Vector2(xSideOffsetBackgroundImage, 0);

                break;

            case GraphyManager.ModulePosition.TOP_RIGHT:

                m_rectTransform.anchorMax        = Vector2.one;
                m_rectTransform.anchorMin        = Vector2.up;
                m_rectTransform.anchoredPosition = new Vector2(0, -ySideOffset);

                m_backgroundImages[0].rectTransform.anchorMax        = Vector2.one;
                m_backgroundImages[0].rectTransform.anchorMin        = Vector2.right;
                m_backgroundImages[0].rectTransform.anchoredPosition = new Vector2(-xSideOffsetBackgroundImage, 0);

                break;

            case GraphyManager.ModulePosition.BOTTOM_LEFT:

                m_rectTransform.anchorMax        = Vector2.right;
                m_rectTransform.anchorMin        = Vector2.zero;
                m_rectTransform.anchoredPosition = new Vector2(0, ySideOffset);

                m_backgroundImages[0].rectTransform.anchorMax        = Vector2.up;
                m_backgroundImages[0].rectTransform.anchorMin        = Vector2.zero;
                m_backgroundImages[0].rectTransform.anchoredPosition = new Vector2(xSideOffsetBackgroundImage, 0);

                break;

            case GraphyManager.ModulePosition.BOTTOM_RIGHT:

                m_rectTransform.anchorMax        = Vector2.right;
                m_rectTransform.anchorMin        = Vector2.zero;
                m_rectTransform.anchoredPosition = new Vector2(0, ySideOffset);

                m_backgroundImages[0].rectTransform.anchorMax        = Vector2.one;
                m_backgroundImages[0].rectTransform.anchorMin        = Vector2.right;
                m_backgroundImages[0].rectTransform.anchoredPosition = new Vector2(-xSideOffsetBackgroundImage, 0);

                break;

            case GraphyManager.ModulePosition.FREE:
                break;
            }

            switch (newModulePosition)
            {
            case GraphyManager.ModulePosition.TOP_LEFT:
            case GraphyManager.ModulePosition.BOTTOM_LEFT:

                m_processorTypeText.alignment         = TextAnchor.UpperLeft;
                m_systemMemoryText.alignment          = TextAnchor.UpperLeft;
                m_graphicsDeviceNameText.alignment    = TextAnchor.UpperLeft;
                m_graphicsDeviceVersionText.alignment = TextAnchor.UpperLeft;
                m_graphicsMemorySizeText.alignment    = TextAnchor.UpperLeft;
                m_screenResolutionText.alignment      = TextAnchor.UpperLeft;
                m_gameWindowResolutionText.alignment  = TextAnchor.UpperLeft;
                m_operatingSystemText.alignment       = TextAnchor.UpperLeft;

                break;

            case GraphyManager.ModulePosition.TOP_RIGHT:
            case GraphyManager.ModulePosition.BOTTOM_RIGHT:

                m_processorTypeText.alignment         = TextAnchor.UpperRight;
                m_systemMemoryText.alignment          = TextAnchor.UpperRight;
                m_graphicsDeviceNameText.alignment    = TextAnchor.UpperRight;
                m_graphicsDeviceVersionText.alignment = TextAnchor.UpperRight;
                m_graphicsMemorySizeText.alignment    = TextAnchor.UpperRight;
                m_screenResolutionText.alignment      = TextAnchor.UpperRight;
                m_gameWindowResolutionText.alignment  = TextAnchor.UpperRight;
                m_operatingSystemText.alignment       = TextAnchor.UpperRight;

                break;

            case GraphyManager.ModulePosition.FREE:
                break;
            }
        }
Esempio n. 5
0
 public void SetPosition(GraphyManager.ModulePosition newModulePosition)
 {
     m_consoleView.SetPosition(newModulePosition);
 }
Esempio n. 6
0
        public void SetPosition(GraphyManager.ModulePosition newModulePosition, Vector2 offset)
        {
            if (newModulePosition == GraphyManager.ModulePosition.FREE)
            {
                return;
            }

            m_rectTransform.anchoredPosition = m_origPosition;

            float xSideOffset = Mathf.Abs(m_rectTransform.anchoredPosition.x) + offset.x;
            float ySideOffset = Mathf.Abs(m_rectTransform.anchoredPosition.y) + offset.y;

            switch (newModulePosition)
            {
            case GraphyManager.ModulePosition.TOP_LEFT:

                m_rectTransform.anchorMax        = Vector2.up;
                m_rectTransform.anchorMin        = Vector2.up;
                m_rectTransform.anchoredPosition = new Vector2(xSideOffset, -ySideOffset);

                break;

            case GraphyManager.ModulePosition.TOP_RIGHT:

                m_rectTransform.anchorMax        = Vector2.one;
                m_rectTransform.anchorMin        = Vector2.one;
                m_rectTransform.anchoredPosition = new Vector2(-xSideOffset, -ySideOffset);

                break;

            case GraphyManager.ModulePosition.BOTTOM_LEFT:

                m_rectTransform.anchorMax        = Vector2.zero;
                m_rectTransform.anchorMin        = Vector2.zero;
                m_rectTransform.anchoredPosition = new Vector2(xSideOffset, ySideOffset);

                break;

            case GraphyManager.ModulePosition.BOTTOM_RIGHT:

                m_rectTransform.anchorMax        = Vector2.right;
                m_rectTransform.anchorMin        = Vector2.right;
                m_rectTransform.anchoredPosition = new Vector2(-xSideOffset, ySideOffset);

                break;
            }

            switch (newModulePosition)
            {
            case GraphyManager.ModulePosition.TOP_LEFT:
            case GraphyManager.ModulePosition.BOTTOM_LEFT:

                m_processorTypeText.alignment         = TextAnchor.UpperLeft;
                m_systemMemoryText.alignment          = TextAnchor.UpperLeft;
                m_graphicsDeviceNameText.alignment    = TextAnchor.UpperLeft;
                m_graphicsDeviceVersionText.alignment = TextAnchor.UpperLeft;
                m_graphicsMemorySizeText.alignment    = TextAnchor.UpperLeft;
                m_screenResolutionText.alignment      = TextAnchor.UpperLeft;
                m_gameWindowResolutionText.alignment  = TextAnchor.UpperLeft;
                m_gameVRResolutionText.alignment      = TextAnchor.UpperLeft;
                m_operatingSystemText.alignment       = TextAnchor.UpperLeft;

                break;

            case GraphyManager.ModulePosition.TOP_RIGHT:
            case GraphyManager.ModulePosition.BOTTOM_RIGHT:

                m_processorTypeText.alignment         = TextAnchor.UpperRight;
                m_systemMemoryText.alignment          = TextAnchor.UpperRight;
                m_graphicsDeviceNameText.alignment    = TextAnchor.UpperRight;
                m_graphicsDeviceVersionText.alignment = TextAnchor.UpperRight;
                m_graphicsMemorySizeText.alignment    = TextAnchor.UpperRight;
                m_screenResolutionText.alignment      = TextAnchor.UpperRight;
                m_gameWindowResolutionText.alignment  = TextAnchor.UpperRight;
                m_gameVRResolutionText.alignment      = TextAnchor.UpperRight;
                m_operatingSystemText.alignment       = TextAnchor.UpperRight;

                break;
            }
        }