Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2024-03-28 15:14:18 -03:00
2 changed files with 32 additions and 2 deletions

8
.gitignore vendored
View File

@@ -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/

View File

@@ -0,0 +1,26 @@
using System;
using Microsoft.Xna.Framework;
namespace Barotrauma.Debugging;
public static class DebugConsoleCore
{
private static Action<string, Color>? newMessage;
private static Action<string>? log;
public static void Init(Action<string, Color> newMessage, Action<string> 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);
}
}