static void ShowLogList() { scrollPos = GUILayout.BeginScrollView(scrollPos); for (int i = 0; i < FileNameList.Length; i++) { if (GUILayout.Button(FileNameList[i])) { isShowLog = true; scrollPos = Vector2.zero; showContent = LogOutPutThread.LoadLogContent(FileNameList[i]); LogPath = LogOutPutThread.GetPath(FileNameList[i]); } } GUILayout.EndScrollView(); if (GUILayout.Button("清除日志")) { OpenWarnWindow("确定要删除所有日志吗?", () => { Debug.Log("已删除所有日志"); FileTool.SafeDeleteDirectory(PathTool.GetAbsolutePath(ResLoadLocation.Persistent, LogOutPutThread.LogPath)); FileNameList = new string[0]; }); } if (GUILayout.Button("返回上层")) { MenuStatus = DevMenuEnum.MainMenu; } }
static void MenuWindow(int windowID) { if (MenuStatus == DevMenuEnum.MainMenu) { if (GUILayout.Button("正常启动", GUILayout.ExpandHeight(true))) { ChoseReplayMode(false); } if (GUILayout.Button("复盘模式", GUILayout.ExpandHeight(true))) { MenuStatus = DevMenuEnum.Replay; FileNameList = GetRelpayFileNames(); } if (GUILayout.Button("查看日志", GUILayout.ExpandHeight(true))) { MenuStatus = DevMenuEnum.Log; FileNameList = LogOutPutThread.GetLogFileNameList(); } } else if (MenuStatus == DevMenuEnum.Replay) { ReplayListGUI(); } else if (MenuStatus == DevMenuEnum.Log) { LogGUI(); } }
static void MenuWindow(int windowID) { GUIUtil.SetGUIStyle(); windowRect = new Rect(Screen.width * 0.2f, Screen.height * 0.05f, Screen.width * 0.6f, Screen.height * 0.9f); if (MenuStatus == DevMenuEnum.MainMenu) { GUIStyle fontStyle = new GUIStyle(); fontStyle.normal.background = null; //设置背景填充 fontStyle.normal.textColor = new Color(1, 0, 0); //设置字体颜色 fontStyle.fontSize = 50; //字体大小 if (GUILayout.Button("正常启动", GUILayout.ExpandHeight(true))) { ChoseReplayMode(false); } if (GUILayout.Button("复盘模式", GUILayout.ExpandHeight(true))) { MenuStatus = DevMenuEnum.Replay; FileNameList = GetRelpayFileNames(); } if (GUILayout.Button("查看日志", GUILayout.ExpandHeight(true))) { MenuStatus = DevMenuEnum.Log; FileNameList = LogOutPutThread.GetLogFileNameList(); } if (GUILayout.Button("测试模式", GUILayout.ExpandHeight(true))) { GameManager.unlockAlllevels = true; ChoseReplayMode(false); } } else if (MenuStatus == DevMenuEnum.Replay) { scrollPos = GUILayout.BeginScrollView(scrollPos); for (int i = 0; i < FileNameList.Length; i++) { if (GUILayout.Button(FileNameList[i])) { ChoseReplayMode(true, FileNameList[i]); } } GUILayout.EndScrollView(); if (GUILayout.Button("返回上层")) { MenuStatus = DevMenuEnum.MainMenu; } } else if (MenuStatus == DevMenuEnum.Log) { LogGUI(); } }
static void MenuWindow(int windowID) { GUIUtil.SetGUIStyle(); windowRect = new Rect(Screen.width * 0.2f, Screen.height * 0.05f, Screen.width * 0.6f, Screen.height * 0.9f); if (MenuStatus == DevMenuEnum.MainMenu) { if (GUILayout.Button("正常启动", GUILayout.ExpandHeight(true))) { ChoseReplayMode(false); } if (GUILayout.Button("复盘模式", GUILayout.ExpandHeight(true))) { MenuStatus = DevMenuEnum.Replay; FileNameList = GetRelpayFileNames(); } if (GUILayout.Button("查看日志", GUILayout.ExpandHeight(true))) { MenuStatus = DevMenuEnum.Log; FileNameList = LogOutPutThread.GetLogFileNameList(); } } else if (MenuStatus == DevMenuEnum.Replay) { scrollPos = GUILayout.BeginScrollView(scrollPos); for (int i = 0; i < FileNameList.Length; i++) { if (GUILayout.Button(FileNameList[i])) { ChoseReplayMode(true, FileNameList[i]); } } GUILayout.EndScrollView(); if (GUILayout.Button("返回上层")) { MenuStatus = DevMenuEnum.MainMenu; } } else if (MenuStatus == DevMenuEnum.Log) { LogGUI(); } }
static void ShowLogList() { scrollPos = GUILayout.BeginScrollView(scrollPos); for (int i = 0; i < FileNameList.Length; i++) { LogName = FileNameList[i]; if (GUILayout.Button(LogName)) { isShowLog = true; scrollPos = Vector2.zero; showContent = LogOutPutThread.LoadLogContent(FileNameList[i]); LogPath = LogOutPutThread.GetPath(FileNameList[i]); } } GUILayout.EndScrollView(); if (GUILayout.Button("复制到设备")) { for (int i = 0; i < FileNameList.Length; i++) { string name = FileNameList[i]; string path = phonePath + name + ".txt"; string LogPath = LogOutPutThread.GetPath(name); FileTool.CreatFilePath(path); File.Copy(LogPath, path, true); } GUIUtil.ShowTips("复制成功"); } if (GUILayout.Button("清除日志")) { OpenWarnWindow("确定要删除所有日志吗?", () => { Debug.Log("已删除所有日志"); FileTool.SafeDeleteDirectory(PathTool.GetAbsolutePath(ResLoadLocation.Persistent, LogOutPutThread.LogPath)); FileNameList = new string[0]; }); } if (GUILayout.Button("返回上层")) { MenuStatus = DevMenuEnum.MainMenu; } }
static void ShowLogList() { scrollPos = GUILayout.BeginScrollView(scrollPos); for (int i = 0; i < FileNameList.Length; i++) { if (GUILayout.Button(FileNameList[i])) { isShowLog = true; scrollPos = Vector2.zero; LogContent = LogOutPutThread.LoadLogContent(FileNameList[i]); } } GUILayout.EndScrollView(); if (GUILayout.Button("返回上层")) { MenuStatus = DevMenuEnum.MainMenu; } }