//#-------------------------------------------------------------------------- // 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); }
void jGuiToolbar_PlayerList(jGuiToolbar tb) { jxE eChild = tb.m_jxE.GetChild(tb.GetToolBarIndex()); string[] cmdList = (string[])eChild.GetUserData("PlayerCmd"); SetPlayerCmdList(cmdList, tb.GetToolBarIndex()); }
//#-------------------------------------------------------------------------- // public member function //#-------------------------------------------------------------------------- public void Reload_PlayerCmd() { jGuiToolbar tb = (jGuiToolbar)m_jGuiWindow.FindCtrl("PlayerList"); jxE eChild = tb.m_jxE.GetChild(tb.GetToolBarIndex()); string[] cmdList = (string[])eChild.GetUserData("PlayerCmd"); SetPlayerCmdList(cmdList, tb.GetToolBarIndex()); }
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() + ")"); }
//#-------------------------------------------------------------------------- // 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); }
void jGuiToolbar_LogFilter(jGuiToolbar ctrl) { changeLogFilter(ctrl); }
//#-------------------------------------------------------------------------- // MonoBehaviour Event //#-------------------------------------------------------------------------- void OnDestroy() { jGuiToolbar tb = (jGuiToolbar)m_jGuiWindow.FindCtrl("PlayerList"); m_CMD.Get_jPlayerPrefs().Set("PlayerList_TookBarIndex", tb.GetToolBarIndex()); }