Update README.md, hide Console when it fails to init

This commit is contained in:
sinaioutlander committed 2020-09-12 02:20:27 +10:00
1 parent de663f34b2
commit 1d07046a74
3 files changed
+8 -3

No files matched your search

+2
View File
@@ -12,6 +12,8 @@
</a>
<img src="https://img.shields.io/github/downloads/sinai-dev/CppExplorer/total.svg" />
[Looking for a Mono version?](https://github.com/sinai-dev/MonoExplorer)
</p>
### Known issues
+3 -2
View File
@@ -21,8 +21,9 @@ namespace Explorer
Pages.Add(new SearchPage());
Pages.Add(new ConsolePage());
foreach (var page in Pages)
for (int i = 0; i < Pages.Count; i++)
{
var page = Pages[i];
page.Init();
}
}
@@ -30,7 +31,7 @@ namespace Explorer
public const int MainWindowID = 5000;
public static Rect MainRect = new Rect(5,5, ModConfig.Instance.Default_Window_Size.x,ModConfig.Instance.Default_Window_Size.y);
private static readonly List<WindowPage> Pages = new List<WindowPage>();
public static readonly List<WindowPage> Pages = new List<WindowPage>();
private static int m_currentPage = 0;
public static void SetCurrentPage(int index)
+3 -1
View File
@@ -58,7 +58,9 @@ MelonLogger.Log(""hello world"");";
}
catch (Exception e)
{
MelonLogger.Log($"Error setting up console!\r\nMessage: {e.Message}\r\nStack: {e.StackTrace}");
MelonLogger.Log($"Error setting up console!\r\nMessage: {e.Message}");
MainMenu.SetCurrentPage(0);
MainMenu.Pages.Remove(this);
}
}