Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -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/
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user