Renormalize line endings and fix copyright headers again.
This commit is contained in:
@@ -34,7 +34,7 @@ namespace OpenRA.Editor
|
||||
|
||||
ITool Tool;
|
||||
|
||||
public bool IsPanning;
|
||||
public bool IsPanning;
|
||||
public bool ShowActorNames;
|
||||
|
||||
public event Action AfterChange = () => { };
|
||||
@@ -338,22 +338,22 @@ namespace OpenRA.Editor
|
||||
Map.Bounds.Left * TileSet.TileSize * Zoom + Offset.X,
|
||||
Map.Bounds.Top * TileSet.TileSize * Zoom + Offset.Y,
|
||||
Map.Bounds.Width * TileSet.TileSize * Zoom,
|
||||
Map.Bounds.Height * TileSet.TileSize * Zoom);
|
||||
|
||||
foreach (var ar in Map.Actors.Value)
|
||||
{
|
||||
if (ActorTemplates.ContainsKey(ar.Value.Type))
|
||||
DrawActor(e.Graphics, ar.Value.Location(), ActorTemplates[ar.Value.Type],
|
||||
GetPaletteForActor(ar.Value));
|
||||
}
|
||||
|
||||
if (ShowActorNames)
|
||||
foreach (var ar in Map.Actors.Value)
|
||||
if (!ar.Key.StartsWith("Actor")) // if it has a custom name
|
||||
e.Graphics.DrawStringContrast(Font, ar.Key,
|
||||
(int)(ar.Value.Location().X * TileSet.TileSize * Zoom + Offset.X),
|
||||
(int)(ar.Value.Location().Y * TileSet.TileSize * Zoom + Offset.Y),
|
||||
Brushes.White,
|
||||
Map.Bounds.Height * TileSet.TileSize * Zoom);
|
||||
|
||||
foreach (var ar in Map.Actors.Value)
|
||||
{
|
||||
if (ActorTemplates.ContainsKey(ar.Value.Type))
|
||||
DrawActor(e.Graphics, ar.Value.Location(), ActorTemplates[ar.Value.Type],
|
||||
GetPaletteForActor(ar.Value));
|
||||
}
|
||||
|
||||
if (ShowActorNames)
|
||||
foreach (var ar in Map.Actors.Value)
|
||||
if (!ar.Key.StartsWith("Actor")) // if it has a custom name
|
||||
e.Graphics.DrawStringContrast(Font, ar.Key,
|
||||
(int)(ar.Value.Location().X * TileSet.TileSize * Zoom + Offset.X),
|
||||
(int)(ar.Value.Location().Y * TileSet.TileSize * Zoom + Offset.Y),
|
||||
Brushes.White,
|
||||
Brushes.Black);
|
||||
|
||||
if (Tool != null)
|
||||
@@ -373,16 +373,16 @@ namespace OpenRA.Editor
|
||||
public static int2 Location(this ActorReference ar)
|
||||
{
|
||||
return ar.InitDict.Get<LocationInit>().value;
|
||||
}
|
||||
|
||||
public static void DrawStringContrast(this SGraphics g, Font f, string s, int x, int y, Brush fg, Brush bg)
|
||||
{
|
||||
g.DrawString(s, f, bg, x - 1, y - 1);
|
||||
g.DrawString(s, f, bg, x + 1, y - 1);
|
||||
g.DrawString(s, f, bg, x - 1, y + 1);
|
||||
g.DrawString(s, f, bg, x + 1, y + 1);
|
||||
|
||||
g.DrawString(s, f, fg, x, y);
|
||||
}
|
||||
|
||||
public static void DrawStringContrast(this SGraphics g, Font f, string s, int x, int y, Brush fg, Brush bg)
|
||||
{
|
||||
g.DrawString(s, f, bg, x - 1, y - 1);
|
||||
g.DrawString(s, f, bg, x + 1, y - 1);
|
||||
g.DrawString(s, f, bg, x - 1, y + 1);
|
||||
g.DrawString(s, f, bg, x + 1, y + 1);
|
||||
|
||||
g.DrawString(s, f, fg, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user