add contrast surround to timer & chat which are displayed straight over the world
This commit is contained in:
@@ -18,6 +18,7 @@ namespace OpenRA.Widgets
|
||||
public class ChatDisplayWidget : Widget
|
||||
{
|
||||
public readonly int RemoveTime = 0;
|
||||
public readonly bool UseContrast = false;
|
||||
|
||||
const int logLength = 9;
|
||||
public string Notification = "";
|
||||
@@ -52,10 +53,13 @@ namespace OpenRA.Widgets
|
||||
{
|
||||
var owner = line.Owner + ":";
|
||||
inset = Game.Renderer.RegularFont.Measure(owner).X + 10;
|
||||
Game.Renderer.RegularFont.DrawText(owner, chatpos, line.Color);
|
||||
|
||||
Game.Renderer.RegularFont.DrawTextWithContrast(owner, chatpos,
|
||||
line.Color, Color.Black, UseContrast ? 1 : 0);
|
||||
}
|
||||
|
||||
Game.Renderer.RegularFont.DrawText(line.Text, chatpos + new int2(inset, 0), Color.White);
|
||||
Game.Renderer.RegularFont.DrawTextWithContrast(line.Text, chatpos + new int2(inset, 0),
|
||||
Color.White, Color.Black, UseContrast ? 1 : 0);
|
||||
}
|
||||
|
||||
Game.Renderer.DisableScissor();
|
||||
|
||||
Reference in New Issue
Block a user