예제 #1
0
파일: WUI.cs 프로젝트: ech0array/chunx
    internal bool Stack(WUIMenu wUIMenu)
    {
        if (baseComponents.wUIMenuStack.Contains(wUIMenu))
        {
            return(false);
        }


        if (baseComponents.wUIMenuStack.Count > 0)
        {
            WUIMenu currentWUIMenu = baseComponents.wUIMenuStack.Peek();
            if (currentWUIMenu != null)
            {
                if (currentWUIMenu.blockStack)
                {
                    return(false);
                }
                currentWUIMenu.Unfocus();
            }
        }

        wUIMenu.transform.position = baseComponents.wUIMenuStack.Count == 0 ? baseComponents.wUIMenuContainer.transform.position : baseData.deltaPosition;
        wUIMenu.Focus();

        baseComponents.wUIMenuStack.Push(wUIMenu);

        return(true);
    }
예제 #2
0
파일: WUI.cs 프로젝트: ech0array/chunx
    internal void Unstack()
    {
        baseComponents.wUIMenuStack.Pop();

        if (baseComponents.wUIMenuStack.Count > 0)
        {
            WUIMenu currentWUIMenu = baseComponents.wUIMenuStack.Peek();
            if (currentWUIMenu != null)
            {
                currentWUIMenu.Focus();
            }
        }
        else
        {
            baseComponents.background.gameObject.SetActive(false);
        }
    }