|
@@ -2,6 +2,7 @@
|
|
|
using System.IO;
|
|
|
using System.Text;
|
|
|
using BepInEx.Configuration;
|
|
|
+using BepInEx.ConsoleUtil;
|
|
|
using UnityInjector.ConsoleUtil;
|
|
|
|
|
|
namespace BepInEx
|
|
@@ -85,6 +86,27 @@ namespace BepInEx
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void SetConsoleColor(ConsoleColor color)
|
|
|
+ {
|
|
|
+ if (!ConsoleActive)
|
|
|
+ throw new InvalidOperationException("Console is not currently active");
|
|
|
+
|
|
|
+ switch (Environment.OSVersion.Platform)
|
|
|
+ {
|
|
|
+ case PlatformID.Win32NT:
|
|
|
+ {
|
|
|
+ Kon.ForegroundColor = color;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Console.ForegroundColor = color;
|
|
|
+ }
|
|
|
+
|
|
|
public static void ForceSetActive(bool value)
|
|
|
{
|
|
|
ConsoleActive = value;
|