Move Text handling to its own class

This commit is contained in:
teinarss
2021-06-03 19:33:32 +02:00
committed by reaperrr
parent 2a26ddc622
commit 82115c6bf7
25 changed files with 97 additions and 74 deletions

View File

@@ -252,7 +252,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
catch (Exception ex)
{
Game.Debug("Failed to delete save file '{0}'. See the logs for details.", savePath);
TextNotificationsManager.Debug("Failed to delete save file '{0}'. See the logs for details.", savePath);
Log.Write("debug", ex.ToString());
return;
}

View File

@@ -320,7 +320,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
catch (Exception ex)
{
Game.Debug("Failed to delete map '{0}'. See the debug.log file for details.", map);
TextNotificationsManager.Debug("Failed to delete map '{0}'. See the debug.log file for details.", map);
Log.Write("debug", ex.ToString());
}

View File

@@ -29,12 +29,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (Game.Settings.Sound.Mute)
{
Game.Sound.MuteAudio();
Game.AddSystemLine("Audio muted");
TextNotificationsManager.AddSystemLine("Audio muted");
}
else
{
Game.Sound.UnmuteAudio();
Game.AddSystemLine("Audio unmuted");
TextNotificationsManager.AddSystemLine("Audio unmuted");
}
return true;

View File

@@ -499,7 +499,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
catch (Exception ex)
{
Game.Debug("Failed to delete replay file '{0}'. See the logs for details.", replay.FilePath);
TextNotificationsManager.Debug("Failed to delete replay file '{0}'. See the logs for details.", replay.FilePath);
Log.Write("debug", ex.ToString());
return;
}