diff --git a/.gitignore b/.gitignore index 3009d17ba..e828c6532 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,12 @@ build/ bld/ [Bb]in/ [Oo]bj/ -[Dd]ebug*/ -[Rr]elease*/ +[Dd]ebugWindows/ +[Rr]eleaseWindows/ +[Dd]ebugMac/ +[Rr]eleaseMac/ +[Dd]ebugLinux/ +[Rr]eleaseLinux/ *.o */Barotrauma*/doc/ diff --git a/Libraries/BarotraumaLibs/BarotraumaCore/Debugging/DebugConsoleCore.cs b/Libraries/BarotraumaLibs/BarotraumaCore/Debugging/DebugConsoleCore.cs new file mode 100644 index 000000000..4d3fe892a --- /dev/null +++ b/Libraries/BarotraumaLibs/BarotraumaCore/Debugging/DebugConsoleCore.cs @@ -0,0 +1,26 @@ +using System; +using Microsoft.Xna.Framework; + +namespace Barotrauma.Debugging; + +public static class DebugConsoleCore +{ + private static Action? newMessage; + private static Action? log; + + public static void Init(Action newMessage, Action log) + { + DebugConsoleCore.newMessage ??= newMessage; + DebugConsoleCore.log ??= log; + } + + public static void NewMessage(string msg, Color? color = null) + { + newMessage?.Invoke(msg, color ?? Color.White); + } + + public static void Log(string msg) + { + log?.Invoke(msg); + } +} \ No newline at end of file