예제 #1
0
    private void PositionWindows()
    {
        TabController2 TC           = tabs[0].GetComponent <TabController2>();
        float          windowHeight = size.y - RealTabHeight() + (TC.NeckHeight() / TC.GetResolution());
        float          windowY      = -1 * (size.y - windowHeight) / 2;

        for (int windowIndex = 0; windowIndex < windows.Count; windowIndex++)
        {
            WindowLayout2 window = windows[windowIndex];

            if (windowIndex == activeWindow)
            {
                window.gameObject.SetActive(true);
                window.PlaceElement(new Vector2(size.x, windowHeight), new Vector2(0f, windowY));
            }
            else
            {
                window.gameObject.SetActive(false);
            }
        }
    }