Beispiel #1
0
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                ///Debug.Log("load : jGuiScrollView : " + g.GetTagName());
                base.Load(stage, win, parent, g, overrideAttribute);
                jxA a;

                if (!m_isLayouted)
                {
                    a = g.AttrVar("ViewRect");
                    if (a == null)
                    {
                        throw new System.Exception(this.ToString() + " must has ViewRect attribute");
                    }
                    if (a.IsEType(nXML.EDataType.e_Rect) == false)
                    {
                        throw new System.Exception(this.ToString() + " is not e_Rect type");
                    }
                    m_ViewRect = a.GetRect();
                }

                a = g.AttrVar("AutoScroll");
                if (a != null)
                {
                    m_isAutoScroll = a.Get_bool();
                }
            }
Beispiel #2
0
    void OnShowModal_ConfigWindow(jGuiWindow win)     // "ConfigWindow"라는 모달윈도우가 보여질때.
    {
        jGuiControl c;

        if (m_CMD.m_PlayerCmdFile.Length >= 4)
        {
            c = m_ConfigWindow_ScrollView.FindCtrl("Player1");
            c.SetText(m_CMD.m_PlayerCmdFile[0].USER_ID);
            c = m_ConfigWindow_ScrollView.FindCtrl("Player2");
            c.SetText(m_CMD.m_PlayerCmdFile[1].USER_ID);
            c = m_ConfigWindow_ScrollView.FindCtrl("Player3");
            c.SetText(m_CMD.m_PlayerCmdFile[2].USER_ID);
            c = m_ConfigWindow_ScrollView.FindCtrl("Player4");
            c.SetText(m_CMD.m_PlayerCmdFile[3].USER_ID);
        }
        jGuiToggle tg;

        tg = (jGuiToggle)m_ConfigWindow_ScrollView.FindCtrl("AddLogCount");
        tg.SetToggleValue(m_CMD.m_isAddLogCount);
        tg = (jGuiToggle)m_ConfigWindow_ScrollView.FindCtrl("AutoPlay");
        tg.SetToggleValue(m_CMD.m_isAutoPlay);

        c = m_ConfigWindow_ScrollView.FindCtrl("MaxLogLine");
        c.SetText(m_CMD.m_MaxLogLine.ToString());

        c = m_ConfigWindow_ScrollView.FindCtrl("Version");
        c.SetText(m_CMD.m_MSG.Version.ToString());

        c = m_ConfigWindow_ScrollView.FindCtrl("ServerListURL");
        c.SetText(m_CMD.GetLoadedServerListURL());
    }
Beispiel #3
0
    //#--------------------------------------------------------------------------
    // public member function
    //#--------------------------------------------------------------------------
    public void OnLoadedGUI_LogWindow(jGuiWindow win)    // "LogWindow"라는 jGuiWindow 로딩이 완료되면 호출됨.
    {
        base.Set_jGuiWindow(win);

        m_lbl_LogLabel = (jGuiLabel)m_jGuiWindow.FindCtrl("LogLabel");
        if (m_lbl_LogLabel == null)
        {
            throw new System.Exception("LogLabel not found");
        }
        m_btn_ClearLog = (jGuiButton)m_jGuiWindow.FindCtrl("ClearLog");
        if (m_btn_ClearLog == null)
        {
            throw new System.Exception("ClearLog not found");
        }


        jGuiToolbar gui_LogFilter = (jGuiToolbar)m_jGuiWindow.FindCtrl("LogFilter");

        if (gui_LogFilter == null)
        {
            throw new System.Exception("LogFilter not found");
        }


        nNWM.nDummy.jFilteredLog.m_MaxLogLine = m_CMD.m_MaxLogLine;
        m_jFilteredLog.Init(gui_LogFilter.m_jxE);
        changeLogFilter(gui_LogFilter);
    }
Beispiel #4
0
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                m_isLayouted = true;
                base.loadDefaultParam(stage, win, parent, g, overrideAttribute);

                base.loadChild(stage, parent, g);
            }
    void OnLoadedGUI_ServerList(jGuiWindow win) // "ServerList"라는 jGuiWindow 로딩이 완료되면 호출됨.
    {
        base.Set_jGuiWindow(win);               // 반드시 호출.

        m_guiServerList = (jGuiScrollView)m_jGuiWindow.FindCtrl("ServerList_ScrollView");
        if (m_guiServerList == null)
        {
            throw new System.Exception("ServerList(jGuiScrollView ) is not found");
        }
    }
Beispiel #6
0
    void OnLoadedGUI_ConfigWindow(jGuiWindow win) // "ConfigWindow"라는 jGuiWindow 로딩이 완료되면 호출됨.
    {
        base.Set_jGuiWindow(win);                 // 반드시 호출.

        m_ConfigWindow_ScrollView = (jGuiScrollView)m_jGuiWindow.FindCtrl("ConfigWindow_ScrollView");
        if (m_ConfigWindow_ScrollView == null)
        {
            Debug.LogError("ConfigWindow_ScrollView is not found");
        }
    }
Beispiel #7
0
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                base.Load(stage, win, parent, g, overrideAttribute);

                m_ToggleValue = g.AttrVar("ToggleValue");
                if (m_ToggleValue == null)
                {
                    throw new System.Exception("jGuiToggle : attribute b_ToggleValue is null");
                }
            }
Beispiel #8
0
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                m_isLayouted = true;                // only GUILayout mode !
                base.Load(stage, win, parent, g, overrideAttribute);

                if (g.AttrVar("Rect") == null)
                {
                    throw new System.Exception(g.GetTagName() + " : need r_Rect=...");
                }
            }
Beispiel #9
0
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                base.Load(stage, win, parent, g, overrideAttribute);
                m_listText = new string[g.size()];
                int i = 0;

                foreach (jxE e in g)
                {
                    m_listText[i++] = e.Get_string();
                }
            }
Beispiel #10
0
            //#--------------------------------------------------------------------------
            // protectec member function
            //#--------------------------------------------------------------------------

            //#--------------------------------------------------------------------------
            // private member function
            //#--------------------------------------------------------------------------


            //#--------------------------------------------------------------------------
            // jGuiControl Event function
            //#--------------------------------------------------------------------------
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                base.Load(stage, win, parent, g, overrideAttribute);

                m_vColumn = g.AttrVar("Column");
                if (m_vColumn == null)
                {
                    throw new System.Exception(ToString() + " has not i_Column attribute");
                }
                ReloadGridString();
            }
Beispiel #11
0
            virtual public void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                //////Debug.Log("load : jGuiControl : " + g.GetTagName());
                loadDefaultParam(stage, win, parent, g, overrideAttribute);

                if (m_isLayouted == false)
                {
                    m_Rect = stage.GetGuiRect(m_jxE);
                }
                else
                {
                    m_jLayoutParam = new jGUILayoutOption(m_jxE, this);
                }
            }
Beispiel #12
0
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                base.Load(stage, win, parent, g, overrideAttribute);
                m_vMask = g.AttrVar("Mask");
                if (m_vMask == null)
                {
                    throw new System.Exception(ToString() + " has not Mask attribute");
                }

                m_vMaxLength = g.AttrVar("MaxLength");
                if (m_vMaxLength == null)
                {
                    throw new System.Exception(ToString() + " has not i_MaxLength attribute");
                }
            }
Beispiel #13
0
            public void CallEventHandler_jGuiWindow(string sEventType, jGuiWindow win)
            {
                string eventHandler = m_GuiEventPrifix + win.GetName();

                Component c = m_EventHandler.GetComponent(eventHandler);

                if (c == null)
                {
                    Debug.LogWarning("Component:" + eventHandler + " is not found");
                    return;
                }
                //Debug.Log("CallEventHandler_jGuiWindow : " + eventHandler + "." + sEventType + " is called");
                //Debug.Log("Component name = " + c.ToString());

                c.SendMessage(sEventType, win, SendMessageOptions.RequireReceiver);
            }
    //#--------------------------------------------------------------------------
    // jGui Event Handler
    //#--------------------------------------------------------------------------
    void OnLoadedGUI_CommandWindow(jGuiWindow win)    // "CommandWindow"라는 jGuiWindow 로딩이 완료되면 호출됨.
    {
        base.Set_jGuiWindow(win);

        m_scroll_CmdList = (jGuiScrollView)m_jGuiWindow.FindCtrl("CmdList");
        if (m_scroll_CmdList == null)
        {
            throw new System.Exception("CmdList(jGuiScrollView) not found");
        }

        m_txt_CommandLine = (jGuiTextField)m_jGuiWindow.FindCtrl("CommandLine");
        if (m_txt_CommandLine == null)
        {
            throw new System.Exception("CommandLine(jGuiTextField) not found");
        }

        //load_PlayerCmdFile();
        {
            string[]    cmdList;
            jGuiToolbar tb = (jGuiToolbar)m_jGuiWindow.FindCtrl("PlayerList");
            if (tb == null)
            {
                throw new System.Exception("PlayerList == null");
            }
            if (m_CMD == null)
            {
                throw new System.Exception("m_CMD == null");
            }

            foreach (jxE e in tb.m_jxE)
            {
                string fileText = m_CMD.m_PlayerCmdFile[e.GetOrder()].text_file.text;
                cmdList = fileText.Split('\n');
                e.SetUserData("PlayerCmd", cmdList);
            }

            int toolbarIndex = tb.GetToolBarIndex();
            m_CMD.Get_jPlayerPrefs().Get("PlayerList_TookBarIndex", ref toolbarIndex);
            tb.SetToolBarIndex(toolbarIndex);

            jxE eChild = tb.m_jxE.GetChild(tb.GetToolBarIndex());
            cmdList = (string[])eChild.GetUserData("PlayerCmd");
            SetPlayerCmdList(cmdList, tb.GetToolBarIndex());
        }

        this.SetWindowText(m_CMD.m_ServerName + " - " + m_CMD.m_ServerIP + ":" + m_CMD.m_ServerPort);
    }
Beispiel #15
0
            //#--------------------------------------------------------------------------
            // prototected
            //#--------------------------------------------------------------------------
            protected void Set_jGuiWindow(jGuiWindow win)
            {
                m_jGuiStage  = win.GetStage();
                m_jGuiWindow = win;

                if (m_jGuiStage == null || m_jGuiWindow == null)
                {
                    throw new System.Exception("m_jGuiStage==null || m_jGuiWindow == null");
                }

                m_GUI = gameObject.GetComponent <GuiEventManager>();
                m_CMD = m_GUI.m_CMD;
                if (m_CMD == null)
                {
                    throw new System.Exception("m_CMD==null");
                }
            }
Beispiel #16
0
            //#--------------------------------------------------------------------------
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            //#--------------------------------------------------------------------------
            {
                base.Load(stage, this, parent, g, overrideAttribute);

                m_vDragWindow = g.AttrVar("DragWindow");
                jxV v = g.AttrVar("IsScalable");

                if (v != null && v.Get_bool())
                {
                    m_EScaleState         = EScaleState.eREADY;
                    m_rectScaleBox.x      = m_Rect.x + m_Rect.width - fTOGGLEBOX_OFFSET;
                    m_rectScaleBox.y      = m_Rect.y + m_Rect.height;
                    m_rectScaleBox.width  = fSCALE_BOX_WIDTH;
                    m_rectScaleBox.height = fSCALE_BOX_HEIGT;
                }

                m_jGuiStage.CallEventHandler_jGuiWindow("OnLoadedGUI_" + GetName(), this);
            }
Beispiel #17
0
            protected void loadDefaultParam(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                m_OverrideAttribute = g.Find("OverrideAttribute", 1);
                if (m_OverrideAttribute == null)
                {
                    m_OverrideAttribute = overrideAttribute;
                }

                m_TextAnchor.t1 = false;
                m_jxE           = g;
                m_jGuiStage     = stage;
                m_jGuiParent    = parent;
                m_Enable        = m_jxE.AttrVar("Enable");
                m_Text          = AttrOverride("Text");
                m_Name          = m_jxE.Attr("Name");
                if (m_Text == null)
                {
                    m_Text = m_Name;
                }

                load_GUIStyle();
            }
Beispiel #18
0
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                base.Load(stage, win, parent, g, overrideAttribute);

                jxV v = g.AttrVar("MaxLength");

                if (v != null)
                {
                    m_iMaxLength = v.Get_int();
                }

                if (m_Text == null)
                {
                    throw new System.Exception(g.GetTagName() + "' Text is not found ");
                }

                v = g.AttrVar("ReadOnly");
                if (v != null)
                {
                    m_bReadOnly = v.Get_bool();
                }
            }
Beispiel #19
0
 public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
 {
     base.Load(stage, win, parent, g, overrideAttribute);
 }
Beispiel #20
0
 public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
 {
     ///Debug.Log("load : jGuiControlGroup : " + g.GetTagName());
     base.Load(stage, win, parent, g, overrideAttribute);
     loadChild(stage, parent, g);
 }
Beispiel #21
0
 void OnLoadedGUI_MainWindow(jGuiWindow win)     // "ConfigWindow2"라는 jGuiWindow 로딩이 완료되면 호출됨.
 {
 }
Beispiel #22
0
 public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
 {
     m_isLayouted = parent.IsLayouted();
     base.Load(stage, win, parent, g, overrideAttribute);
 }
    void OnShowModal_ServerList(jGuiWindow win)     // "ServerList"라는 모달
    {
        jxE eServerList = m_CMD.GetCurrServerList();

        if (eServerList == null)
        {
            m_CMD.LogWarning(m_CMD.m_DefaultServerListName + " is not found in ServerList xml");
            return;
        }

        int iSize = eServerList.size() - m_guiServerList.m_jxE.size();

        if (iSize > 0)        // 다운로드 받은 서버리스트 보다 gui xml의 서버리스트 컨트롤이 적다면 컨트롤 추가.
        {
            for (int i = 0; i < iSize; ++i)
            {
                jxE eServer = m_guiServerList.m_jxE.begin().MakeClone();
                m_guiServerList.m_jxE.InsertChild(eServer);

                // jGuiContorl 리로딩.
                jGuiControl new_ctrl = m_guiServerList.GetStage().CreateRTTI(eServer);
                if (new_ctrl == null)
                {
                    eServer.DebugPrint();
                    throw new System.Exception("CreateRTTI : new_ctrl==null");
                }
                new_ctrl.m_isLayouted = m_guiServerList.m_isLayouted;
                new_ctrl.Load(m_guiServerList.GetStage()
                              , m_guiServerList.GetWindow()
                              , m_guiServerList
                              , eServer
                              , m_guiServerList.Get_OverrideAttribute());
            }
        }
        int idx = 0;

        foreach (jGuiControl gui in m_guiServerList)
        {
            if (idx >= eServerList.size())
            {
                gui.SetEnabled(false);
                continue;
            }
            var    btn    = (jGuiButton)gui.FindCtrl("ServerOk");
            jxE    server = eServerList.GetChild(idx);
            string name   = server.Attr("NAME");
            string text   = name + " " + server.Attr("IP") + ":" + server.AttrVar("PORT").Get_int().ToString();
            var    lbl    = (jGuiLabel)gui.FindCtrl("ServerStatus");
            if (name == m_CMD.m_ServerName)
            {
                lbl.SetText("Selected");
            }
            else
            {
                lbl.SetText("Unkown");
            }

            btn.SetText(text);
            ++idx;
        }
        UpdateServerStatus();
    }
 void OnShowModal_ConfigWindow(jGuiWindow win)     // "ConfigWindow"라는 모달윈도우가 보여질때.
 {
 }
 void OnLoadedGUI_LogFiltterWindow(jGuiWindow win) // "LogFiltterWindow"라는 jGuiWindow 로딩이 완료되면 호출됨.
 {
     base.Set_jGuiWindow(win);                     // 반드시 호출.
 }
Beispiel #26
0
 public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
 {
     m_isLayouted = true;                // only GUILayout mode !
     base.Load(stage, win, parent, g, overrideAttribute);
 }