Exemple #1
0
    void changeLogFilter(jGuiToolbar ctrl)
    {
        List <string> logList = m_jFilteredLog.ChangeLogFilter(ctrl.GetToolBarIndex());

        if (logList == null)
        {
            return;
        }
        refreshLog(logList);

        jxE eChild = ctrl.m_jxE.GetChild(ctrl.GetToolBarIndex());

        m_btn_ClearLog.SetText("Clear (" + eChild.Get_string() + ")");
    }
    //#--------------------------------------------------------------------------
    // private member function
    //#--------------------------------------------------------------------------

    void AddPlayerCmd(string cmd, int idx)
    {
        // 맨처음 노드는 cmd용 original 탬플릿이다.
        jxE  eCmdGroup;
        bool isReloadGui = false;

        if (idx >= m_scroll_CmdList.m_jxE.size())
        {
            eCmdGroup = m_scroll_CmdList.m_jxE.begin().MakeClone();
            m_scroll_CmdList.m_jxE.InsertChild(eCmdGroup);
            isReloadGui = true;
        }
        else
        {
            eCmdGroup = m_scroll_CmdList.m_jxE.GetChild(idx);
        }

        eCmdGroup.AttrVar("Enable").Set_bool(true);
        jxA a;
        jxE eCmdText = eCmdGroup.FindByAttr("Name", "CmdRun", out a);

        a = eCmdText.AttrVar("Text");
        a.Set_string(cmd);

        if (isReloadGui)
        {
            // jGuiContorl 리로딩.
            jGuiControl ctrl = m_scroll_CmdList.GetStage().CreateRTTI(eCmdGroup);
            jDebug.jASSERT(ctrl != null);
            ctrl.m_isLayouted = m_scroll_CmdList.m_isLayouted;
            ctrl.Load(m_scroll_CmdList.GetStage()
                      , m_scroll_CmdList.GetWindow()
                      , m_scroll_CmdList
                      , eCmdGroup
                      , m_scroll_CmdList.Get_OverrideAttribute());
        }
        else
        {
            jGuiButton btn = (jGuiButton)eCmdText.m_UserData;
            btn.SetText(cmd);
        }
    }