예제 #1
0
            public void ShowModalWindow(string windowName)             //gui xml에서 <Modal_Window>의 자식항목중에 해당 이름의 윈도우를 뛰운다.
            {
                if (m_eModal_Window == null)
                {
                    Debug.LogWarning("gui xml file has not Modal_Window node");
                    return;
                }

                jxA findA;
                jxE e = m_eModal_Window.FindByAttr("Name", windowName, out findA);

                if (e == null)
                {
                    Debug.LogWarning("Modal_Window is not found : " + windowName);
                    return;
                }
                var modal = (jGuiWindow)e.m_UserData;

                if (modal == null)
                {
                    Debug.LogWarning("Modal_Window jGuiControl==null : " + windowName);
                    return;
                }

                foreach (jxE eCtrl in m_ejGuiList)
                {
                    jGuiControl w = (jGuiControl)eCtrl.m_UserData;
                    if (w == null)
                    {
                        continue;
                    }
                    if (w.IsEnabled())
                    {
                        m_BackupEnableWindowStatus.Add(w);
                        w.SetEnabled(false);
                    }
                }

                Rect rect = modal.GetXmlRect();

                rect.x = (Screen.width - rect.width) / 2;
                rect.y = (Screen.height - rect.height) / 2;
                modal.SetRect(rect);

                CallEventHandler_jGuiWindow("OnShowModal_" + modal.GetName(), modal);

                m_ModalWindowList.Add(modal);
            }
예제 #2
0
            public void OnGUI()
            {
                GUI.skin = m_GUISkin;

                if (m_ModalWindowList.Count > 0)
                {
                    var mw = m_ModalWindowList[m_ModalWindowList.Count - 1];
                    mw.OnGUI();
                    return;
                }

                foreach (jxE e in m_ejGuiList)
                {
                    jGuiControl w = (jGuiControl)e.m_UserData;
                    if (w == null)
                    {
                        continue;
                    }
                    if (w.IsEnabled())
                    {
                        w.OnGUI();
                    }
                }
            }