Ejemplo n.º 1
0
    public void ShowView(IViewOwner owner)
    {
        if (IsInitialized == false)
        {
            return;
        }
        if (Owner != null)
        {
            return;
        }

        if (IsVisible == true)
        {
            return;
        }
        IsVisible = true;

        Owner = owner;

        if (Layout != null)
        {
            Layout.Show(true);
        }

        OnViewShow();
    }
Ejemplo n.º 2
0
 // we need to keep this for back-compatibility
 // remove it later
 public void ShowLayout(GUIBase_Layout layout, bool show)
 {
     if (layout != null)
     {
         layout.Show(show);
     }
 }
    public void Show(bool show)
    {
        bool mouseOnLeft = Input.mousePosition.x < (m_ShowOnRight ? Screen.width / 5 * 3 : Screen.width / 5 * 2);

        if (!m_ShowOnRight && mouseOnLeft)
        {
            Vector3 position = m_Layout.transform.position;
            position.x = Screen.width - m_Layout.transform.Find("Background").transform.position.x *2;
            m_Layout.transform.position = position;
            m_ShowOnRight = true;
            m_Layout.SetModify(true, false);
        }
        else if (m_ShowOnRight && !mouseOnLeft)
        {
            m_Layout.transform.position = new Vector3(0, m_Layout.transform.position.y, m_Layout.transform.position.z);
            m_ShowOnRight = false;
            m_Layout.SetModify(true, false);
        }
        m_Layout.Show(show);
    }