Updated the observer ui

This commit is contained in:
teinarss
2019-05-22 14:56:52 +02:00
committed by Paul Chote
parent b90b3095a6
commit 9fc8b829e4
23 changed files with 3773 additions and 2076 deletions

View File

@@ -148,19 +148,19 @@ namespace OpenRA.Mods.Common.Widgets
for (int n = pointStart, x = 0; n <= pointEnd; n++, x += xStep)
{
cr.DrawLine(origin + new float2(x, 0), origin + new float2(x, -5), 1, Color.White);
tiny.DrawText(GetXAxisValueFormat().F(n), origin + new float2(x, 2), Color.White);
tiny.DrawTextWithShadow(GetXAxisValueFormat().F(n), origin + new float2(x, 2), Color.White, BackgroundColorDark, BackgroundColorLight, 1);
}
bold.DrawText(GetXAxisLabel(), origin + new float2(width / 2, 20), Color.White);
bold.DrawTextWithShadow(GetXAxisLabel(), origin + new float2(width / 2, 20), Color.White, BackgroundColorDark, BackgroundColorLight, 1);
for (var y = GetDisplayFirstYAxisValue() ? 0 : yStep; y <= height; y += yStep)
{
var yValue = y / scale;
cr.DrawLine(origin + new float2(width - 5, -y), origin + new float2(width, -y), 1, Color.White);
tiny.DrawText(GetYAxisValueFormat().F(yValue), origin + new float2(width + 2, -y), Color.White);
tiny.DrawTextWithShadow(GetYAxisValueFormat().F(yValue), origin + new float2(width + 2, -y), Color.White, BackgroundColorDark, BackgroundColorLight, 1);
}
bold.DrawText(GetYAxisLabel(), origin + new float2(width + 40, -(height / 2)), Color.White);
bold.DrawTextWithShadow(GetYAxisLabel(), origin + new float2(width + 40, -(height / 2)), Color.White, BackgroundColorDark, BackgroundColorLight, 1);
cr.DrawLine(origin, origin + new float2(width, 0), 1, Color.White);
cr.DrawLine(origin, origin + new float2(0, -height), 1, Color.White);