Move Text handling to its own class
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -261,12 +261,12 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
// Check if selecting actors on the screen has selected new units
|
||||
if (ownUnitsOnScreen.Count > World.Selection.Actors.Count())
|
||||
Game.AddSystemLine("Selected across screen");
|
||||
TextNotificationsManager.AddSystemLine("Selected across screen");
|
||||
else
|
||||
{
|
||||
// Select actors in the world that have highest selection priority
|
||||
ownUnitsOnScreen = SelectActorsInWorld(World, null, eligiblePlayers).SubsetWithHighestSelectionPriority(e.Modifiers).ToList();
|
||||
Game.AddSystemLine("Selected across map");
|
||||
TextNotificationsManager.AddSystemLine("Selected across map");
|
||||
}
|
||||
|
||||
World.Selection.Combine(World, ownUnitsOnScreen, false, false);
|
||||
@@ -293,12 +293,12 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
// Check if selecting actors on the screen has selected new units
|
||||
if (newSelection.Count > World.Selection.Actors.Count())
|
||||
Game.AddSystemLine("Selected across screen");
|
||||
TextNotificationsManager.AddSystemLine("Selected across screen");
|
||||
else
|
||||
{
|
||||
// Select actors in the world that have the same selection class as one of the already selected actors
|
||||
newSelection = SelectActorsInWorld(World, selectedClasses, eligiblePlayers).ToList();
|
||||
Game.AddSystemLine("Selected across map");
|
||||
TextNotificationsManager.AddSystemLine("Selected across map");
|
||||
}
|
||||
|
||||
World.Selection.Combine(World, newSelection, true, false);
|
||||
|
||||
Reference in New Issue
Block a user