diff --git a/OpenRA.Game/Graphics/SpriteFont.cs b/OpenRA.Game/Graphics/SpriteFont.cs index 3e3681f9ed..11d26125fa 100644 --- a/OpenRA.Game/Graphics/SpriteFont.cs +++ b/OpenRA.Game/Graphics/SpriteFont.cs @@ -92,6 +92,52 @@ namespace OpenRA.Graphics } } + float3 Rotate(float3 v, float sina, float cosa, float2 offset) + { + return new float3( + v.X * cosa - v.Y * sina + offset.X, + v.X * sina + v.Y * cosa + offset.Y, + 0); + } + + public void DrawText(string text, float2 location, Color c, float angle) + { + // Offset from the baseline position to the top-left of the glyph for rendering + var offset = new float2(0, size); + var cosa = (float)Math.Cos(-angle); + var sina = (float)Math.Sin(-angle); + + var p = offset; + foreach (var s in text) + { + if (s == '\n') + { + offset += new float2(0, size); + p = offset; + continue; + } + + var g = glyphs[Pair.New(s, c)]; + if (g.Sprite != null) + { + var tl = new float3( + (int)Math.Round(p.X * deviceScale + g.Offset.X, 0) / deviceScale, + p.Y + g.Offset.Y / deviceScale, 0); + var br = tl + g.Sprite.Size / deviceScale; + var tr = new float3(br.X, tl.Y, 0); + var bl = new float3(tl.X, br.Y, 0); + + Game.Renderer.RgbaSpriteRenderer.DrawSprite(g.Sprite, + Rotate(tl, sina, cosa, location), + Rotate(tr, sina, cosa, location), + Rotate(br, sina, cosa, location), + Rotate(bl, sina, cosa, location)); + } + + p += new float2(g.Advance / deviceScale, 0); + } + } + public void DrawTextWithContrast(string text, float2 location, Color fg, Color bg, int offset) { if (offset > 0) @@ -123,6 +169,19 @@ namespace OpenRA.Graphics DrawTextWithShadow(text, location, fg, GetContrastColor(fg, bgDark, bgLight), offset); } + public void DrawTextWithShadow(string text, float2 location, Color fg, Color bg, int offset, float angle) + { + if (offset != 0) + DrawText(text, location + new float2(offset, offset), bg, angle); + + DrawText(text, location, fg, angle); + } + + public void DrawTextWithShadow(string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset, float angle) + { + DrawTextWithShadow(text, location, fg, GetContrastColor(fg, bgDark, bgLight), offset, angle); + } + public int2 Measure(string text) { if (string.IsNullOrEmpty(text)) diff --git a/OpenRA.Mods.Common/Widgets/LineGraphWidget.cs b/OpenRA.Mods.Common/Widgets/LineGraphWidget.cs index 16cc2e33e7..f71c9af078 100644 --- a/OpenRA.Mods.Common/Widgets/LineGraphWidget.cs +++ b/OpenRA.Mods.Common/Widgets/LineGraphWidget.cs @@ -42,6 +42,7 @@ namespace OpenRA.Mods.Common.Widgets public string AxisFont; public Color BackgroundColorDark = ChromeMetrics.Get("TextContrastColorDark"); public Color BackgroundColorLight = ChromeMetrics.Get("TextContrastColorLight"); + public int Padding = 5; public LineGraphWidget() { @@ -83,31 +84,46 @@ namespace OpenRA.Mods.Common.Widgets AxisFont = other.AxisFont; BackgroundColorDark = other.BackgroundColorDark; BackgroundColorLight = other.BackgroundColorLight; + Padding = other.Padding; } public override void Draw() { if (GetSeries == null || !GetSeries().Any() - || GetLabelFont == null || GetLabelFont() == null - || GetAxisFont == null || GetAxisFont() == null) + || GetLabelFont == null || GetLabelFont() == null) return; var cr = Game.Renderer.RgbaColorRenderer; var rect = RenderBounds; - var origin = new float2(rect.Left, rect.Bottom); - var width = rect.Width; - var height = rect.Height; - - var tiny = Game.Renderer.Fonts[GetLabelFont()]; - var bold = Game.Renderer.Fonts[GetAxisFont()]; + var labelFont = Game.Renderer.Fonts[GetLabelFont()]; + var axisFont = Game.Renderer.Fonts[GetAxisFont()]; var xAxisSize = GetXAxisSize(); var yAxisSize = GetYAxisSize(); + var xAxisLabel = GetXAxisLabel(); + var xAxisLabelSize = axisFont.Measure(xAxisLabel); + + var xAxisPointLabelHeight = labelFont.Measure("0").Y; + + var graphBottomOffset = Padding * 2 + xAxisLabelSize.Y + xAxisPointLabelHeight; + var height = rect.Height - (graphBottomOffset + Padding); + var maxValue = GetSeries().Select(p => p.Points).SelectMany(d => d).Concat(new[] { 0f }).Max(); + var longestName = GetSeries().Select(s => s.Key).OrderByDescending(s => s.Length).FirstOrDefault() ?? ""; + var scale = 200 / Math.Max(5000, (float)Math.Ceiling(maxValue / 1000) * 1000); + var widthMaxValue = labelFont.Measure(GetYAxisValueFormat().F(height / scale)).X; + var widthLongestName = labelFont.Measure(longestName).X; + + // y axis label + var yAxisLabel = GetYAxisLabel(); + var yAxisLabelSize = axisFont.Measure(yAxisLabel); + + var width = rect.Width - (Padding * 4 + widthMaxValue + widthLongestName + yAxisLabelSize.Y); + var xStep = width / xAxisSize; var yStep = height / yAxisSize; @@ -115,6 +131,10 @@ namespace OpenRA.Mods.Common.Widgets var pointStart = Math.Max(0, pointCount - xAxisSize); var pointEnd = Math.Max(pointCount, xAxisSize); + var graphOrigin = new float2(rect.Left, rect.Bottom) + new float2(Padding * 2 + widthMaxValue + yAxisLabelSize.Y, -graphBottomOffset); + + var origin = new float2(rect.Left, rect.Bottom); + var keyOffset = 0; foreach (var series in GetSeries()) { @@ -131,41 +151,53 @@ namespace OpenRA.Mods.Common.Widgets { lastX = x; lastPoint = point; - return origin + new float3(x * xStep, -point * scale, 0); + return graphOrigin + new float3(x * xStep, -point * scale, 0); }), 1, color); if (lastPoint != 0f) - tiny.DrawTextWithShadow(GetValueFormat().F(lastPoint), origin + new float2(lastX * xStep, -lastPoint * scale - 2), + labelFont.DrawTextWithShadow(GetValueFormat().F(lastPoint), graphOrigin + new float2(lastX * xStep, -lastPoint * scale - 2), color, BackgroundColorDark, BackgroundColorLight, 1); } - tiny.DrawTextWithShadow(key, new float2(rect.Left, rect.Top) + new float2(5, 10 * keyOffset + 3), + labelFont.DrawTextWithShadow(key, new float2(rect.Right, rect.Top) + new float2(-(widthLongestName + Padding), 10 * keyOffset + 3), color, BackgroundColorDark, BackgroundColorLight, 1); keyOffset++; } + // Draw x axis + axisFont.DrawTextWithShadow(xAxisLabel, new float2(graphOrigin.X, origin.Y) + new float2(width / 2 - xAxisLabelSize.X / 2, -(xAxisLabelSize.Y + Padding)), Color.White, BackgroundColorDark, BackgroundColorLight, 1); + // TODO: make this stuff not draw outside of the RenderBounds 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.DrawTextWithShadow(GetXAxisValueFormat().F(n), origin + new float2(x, 2), Color.White, BackgroundColorDark, BackgroundColorLight, 1); + cr.DrawLine(graphOrigin + new float2(x, 0), graphOrigin + new float2(x, -5), 1, Color.White); + var xAxisText = GetXAxisValueFormat().F(n); + var xAxisTickTextWidth = labelFont.Measure(xAxisText).X; + var xLocation = x - (xAxisTickTextWidth / 2); + labelFont.DrawTextWithShadow(xAxisText, graphOrigin + new float2(xLocation, 2), Color.White, BackgroundColorDark, BackgroundColorLight, 1); } - bold.DrawTextWithShadow(GetXAxisLabel(), origin + new float2(width / 2, 20), Color.White, BackgroundColorDark, BackgroundColorLight, 1); + // Draw y axis + axisFont.DrawTextWithShadow(yAxisLabel, new float2(origin.X, graphOrigin.Y) + new float2(5 - axisFont.TopOffset, -(height / 2 - yAxisLabelSize.X / 2)), Color.White, BackgroundColorDark, BackgroundColorLight, 1, (float)Math.PI / 2); 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.DrawTextWithShadow(GetYAxisValueFormat().F(yValue), origin + new float2(width + 2, -y), Color.White, BackgroundColorDark, BackgroundColorLight, 1); + cr.DrawLine(graphOrigin + new float2(0, -y), graphOrigin + new float2(5, -y), 1, Color.White); + var text = GetYAxisValueFormat().F(yValue); + + var textWidth = labelFont.Measure(text); + + var yLocation = y + (textWidth.Y + labelFont.TopOffset) / 2; + + labelFont.DrawTextWithShadow(text, graphOrigin + new float2(-(textWidth.X + 3), -yLocation), Color.White, BackgroundColorDark, BackgroundColorLight, 1); } - bold.DrawTextWithShadow(GetYAxisLabel(), origin + new float2(width + 40, -(height / 2)), Color.White, BackgroundColorDark, BackgroundColorLight, 1); + // Bottom line + cr.DrawLine(graphOrigin, graphOrigin + new float2(width, 0), 1, Color.White); - cr.DrawLine(origin, origin + new float2(width, 0), 1, Color.White); - cr.DrawLine(origin, origin + new float2(0, -height), 1, Color.White); - cr.DrawLine(origin + new float2(width, 0), origin + new float2(width, -height), 1, Color.White); - cr.DrawLine(origin + new float2(0, -height), origin + new float2(width, -height), 1, Color.White); + // Left line + cr.DrawLine(graphOrigin, graphOrigin + new float2(0, -height), 1, Color.White); } public override Widget Clone() diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs index aec378c6f6..f47eac2d8a 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs @@ -32,8 +32,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly ContainerWidget productionStatsHeaders; readonly ContainerWidget supportPowerStatsHeaders; readonly ContainerWidget combatStatsHeaders; - readonly ContainerWidget earnedThisMinuteGraphHeaders; - readonly ContainerWidget armyThisMinuteGraphHeaders; readonly ScrollPanelWidget playerStatsPanel; readonly ScrollItemWidget basicPlayerTemplate; readonly ScrollItemWidget economyPlayerTemplate; @@ -53,6 +51,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly string clickSound = ChromeMetrics.Get("ClickSound"); bool noneSelected = true; + ObserverStatsPanel activePanel; [ObjectCreator.UseCtor] public ObserverStatsLogic(World world, ModData modData, WorldRenderer worldRenderer, Widget widget, Dictionary logicArgs) @@ -76,9 +75,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic supportPowerStatsHeaders = widget.Get("SUPPORT_POWERS_HEADERS"); combatStatsHeaders = widget.Get("COMBAT_STATS_HEADERS"); - earnedThisMinuteGraphHeaders = widget.Get("EARNED_THIS_MIN_GRAPH_HEADERS"); - armyThisMinuteGraphHeaders = widget.Get("ARMY_THIS_MIN_GRAPH_HEADERS"); - playerStatsPanel = widget.Get("PLAYER_STATS_PANEL"); playerStatsPanel.Layout = new GridLayout(playerStatsPanel); playerStatsPanel.IgnoreMouseOver = true; @@ -109,18 +105,19 @@ namespace OpenRA.Mods.Common.Widgets.Logic teamTemplate = playerStatsPanel.Get("TEAM_TEMPLATE"); var statsDropDown = widget.Get("STATS_DROPDOWN"); - Func createStatsOption = (title, headers, template, a) => + Func createStatsOption = (title, panel, template, a) => { return new StatsDropDownOption { Title = title, - IsSelected = () => headers.Visible, + IsSelected = () => activePanel == panel, OnClick = () => { noneSelected = false; ClearStats(); playerStatsPanel.Visible = true; statsDropDown.GetText = () => title; + activePanel = panel; if (template != null) AdjustStatisticsPanel(template); @@ -144,13 +141,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic ClearStats(); } }, - createStatsOption("Basic", basicStatsHeaders, basicPlayerTemplate, () => DisplayStats(BasicStats)), - createStatsOption("Economy", economyStatsHeaders, economyPlayerTemplate, () => DisplayStats(EconomyStats)), - createStatsOption("Production", productionStatsHeaders, productionPlayerTemplate, () => DisplayStats(ProductionStats)), - createStatsOption("Support Powers", supportPowerStatsHeaders, supportPowersPlayerTemplate, () => DisplayStats(SupportPowerStats)), - createStatsOption("Combat", combatStatsHeaders, combatPlayerTemplate, () => DisplayStats(CombatStats)), - createStatsOption("Earnings (graph)", earnedThisMinuteGraphHeaders, null, () => EarnedThisMinuteGraph()), - createStatsOption("Army (graph)", armyThisMinuteGraphHeaders, null, () => ArmyThisMinuteGraph()), + createStatsOption("Basic", ObserverStatsPanel.Basic, basicPlayerTemplate, () => DisplayStats(BasicStats)), + createStatsOption("Economy", ObserverStatsPanel.Economy, economyPlayerTemplate, () => DisplayStats(EconomyStats)), + createStatsOption("Production", ObserverStatsPanel.Production, productionPlayerTemplate, () => DisplayStats(ProductionStats)), + createStatsOption("Support Powers", ObserverStatsPanel.SupportPowers, supportPowersPlayerTemplate, () => DisplayStats(SupportPowerStats)), + createStatsOption("Combat", ObserverStatsPanel.Combat, combatPlayerTemplate, () => DisplayStats(CombatStats)), + createStatsOption("Earnings (graph)", ObserverStatsPanel.Graph, null, () => EarnedThisMinuteGraph()), + createStatsOption("Army (graph)", ObserverStatsPanel.ArmyGraph, null, () => ArmyThisMinuteGraph()), }; Func setupItem = (option, template) => @@ -196,8 +193,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic productionStatsHeaders.Visible = false; supportPowerStatsHeaders.Visible = false; combatStatsHeaders.Visible = false; - earnedThisMinuteGraphHeaders.Visible = false; - armyThisMinuteGraphHeaders.Visible = false; earnedThisMinuteGraphContainer.Visible = false; armyThisMinuteGraphContainer.Visible = false; @@ -209,7 +204,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic void EarnedThisMinuteGraph() { playerStatsPanel.Visible = false; - earnedThisMinuteGraphHeaders.Visible = true; earnedThisMinuteGraphContainer.Visible = true; earnedThisMinuteGraph.GetSeries = () => @@ -222,7 +216,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic void ArmyThisMinuteGraph() { playerStatsPanel.Visible = false; - armyThisMinuteGraphHeaders.Visible = true; armyThisMinuteGraphContainer.Visible = true; armyThisMinuteGraph.GetSeries = () => diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index 4a233fca79..52decf5c01 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -639,62 +639,6 @@ Container@OBSERVER_WIDGETS: Text: Army Value Align: Right Shadow: True - Container@EARNED_THIS_MIN_GRAPH_HEADERS: - X: 0 - Y: 0 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - Children: - ColorBlock@HEADER_COLOR: - X: 0 - Y: 0 - Color: 00000090 - Width: PARENT_RIGHT - 200 - Height: PARENT_BOTTOM - GradientColorBlock@HEADER_GRADIENT: - X: PARENT_RIGHT - 200 - Y: 0 - TopLeftColor: 00000090 - BottomLeftColor: 00000090 - Width: 200 - Height: PARENT_BOTTOM - Label@EARNED_THIS_MIN_HEADER: - X: 0 - Y: 0 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - Text: Earnings received each minute - Align: Center - Shadow: True - Container@ARMY_THIS_MIN_GRAPH_HEADERS: - X: 0 - Y: 0 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - Children: - ColorBlock@HEADER_COLOR: - X: 0 - Y: 0 - Color: 00000090 - Width: PARENT_RIGHT - 200 - Height: PARENT_BOTTOM - GradientColorBlock@HEADER_GRADIENT: - X: PARENT_RIGHT - 200 - Y: 0 - TopLeftColor: 00000090 - BottomLeftColor: 00000090 - Width: 200 - Height: PARENT_BOTTOM - Label@EARNED_THIS_MIN_HEADER: - X: 0 - Y: 0 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - Text: Army value over time - Align: Center - Shadow: True ScrollPanel@PLAYER_STATS_PANEL: X: 0 Y: 54 @@ -1062,9 +1006,9 @@ Container@OBSERVER_WIDGETS: Shadow: True Container@EARNED_THIS_MIN_GRAPH_CONTAINER: X: 0 - Y: 54 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - 65 + Y: 30 + Width: PARENT_RIGHT + Height: PARENT_BOTTOM Visible: False Children: ColorBlock@GRAPH_BACKGROUND: @@ -1083,15 +1027,15 @@ Container@OBSERVER_WIDGETS: YAxisValueFormat: ${0:F0} XAxisSize: 20 YAxisSize: 10 - XAxisLabel: m - YAxisLabel: $ + XAxisLabel: Game Minute + YAxisLabel: Earnings LabelFont: TinyBold - AxisFont: Bold + AxisFont: TinyBold Container@ARMY_THIS_MIN_GRAPH_CONTAINER: X: 0 - Y: 54 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - 65 + Y: 30 + Width: PARENT_RIGHT + Height: PARENT_BOTTOM Visible: False Children: ColorBlock@GRAPH_BACKGROUND: @@ -1110,10 +1054,10 @@ Container@OBSERVER_WIDGETS: YAxisValueFormat: ${0:F0} XAxisSize: 20 YAxisSize: 10 - XAxisLabel: m - YAxisLabel: $ + XAxisLabel: Game Minute + YAxisLabel: Army Value LabelFont: TinyBold - AxisFont: Bold + AxisFont: TinyBold Container@PLAYER_WIDGETS: Children: diff --git a/mods/common/chrome/ingame-observer.yaml b/mods/common/chrome/ingame-observer.yaml index 7cfb3f6507..29fb488ead 100644 --- a/mods/common/chrome/ingame-observer.yaml +++ b/mods/common/chrome/ingame-observer.yaml @@ -543,62 +543,6 @@ Container@OBSERVER_WIDGETS: Text: Army Value Align: Right Shadow: True - Container@EARNED_THIS_MIN_GRAPH_HEADERS: - X: 0 - Y: 0 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - Children: - ColorBlock@HEADER_COLOR: - X: 0 - Y: 0 - Color: 00000090 - Width: PARENT_RIGHT - 200 - Height: PARENT_BOTTOM - GradientColorBlock@HEADER_GRADIENT: - X: PARENT_RIGHT - 200 - Y: 0 - TopLeftColor: 00000090 - BottomLeftColor: 00000090 - Width: 200 - Height: PARENT_BOTTOM - Label@EARNED_THIS_MIN_HEADER: - X: 0 - Y: 0 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - Text: Earnings received each minute - Align: Center - Shadow: True - Container@ARMY_THIS_MIN_GRAPH_HEADERS: - X: 0 - Y: 0 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - Children: - ColorBlock@HEADER_COLOR: - X: 0 - Y: 0 - Color: 00000090 - Width: PARENT_RIGHT - 200 - Height: PARENT_BOTTOM - GradientColorBlock@HEADER_GRADIENT: - X: PARENT_RIGHT - 200 - Y: 0 - TopLeftColor: 00000090 - BottomLeftColor: 00000090 - Width: 200 - Height: PARENT_BOTTOM - Label@EARNED_THIS_MIN_HEADER: - X: 0 - Y: 0 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - Text: Army value over time - Align: Center - Shadow: True ScrollPanel@PLAYER_STATS_PANEL: X: 0 Y: 55 @@ -956,9 +900,9 @@ Container@OBSERVER_WIDGETS: Shadow: True Container@EARNED_THIS_MIN_GRAPH_CONTAINER: X: 0 - Y: 54 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - 65 + Y: 30 + Width: PARENT_RIGHT + Height: PARENT_BOTTOM Visible: False Children: ColorBlock@GRAPH_BACKGROUND: @@ -977,15 +921,15 @@ Container@OBSERVER_WIDGETS: YAxisValueFormat: ${0:F0} XAxisSize: 20 YAxisSize: 10 - XAxisLabel: m - YAxisLabel: $ + XAxisLabel: Game Minute + YAxisLabel: Earnings LabelFont: TinyBold - AxisFont: Bold + AxisFont: TinyBold Container@ARMY_THIS_MIN_GRAPH_CONTAINER: X: 0 - Y: 54 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - 65 + Y: 30 + Width: PARENT_RIGHT + Height: PARENT_BOTTOM Visible: False Children: ColorBlock@GRAPH_BACKGROUND: @@ -1004,7 +948,7 @@ Container@OBSERVER_WIDGETS: YAxisValueFormat: ${0:F0} XAxisSize: 20 YAxisSize: 10 - XAxisLabel: m - YAxisLabel: $ + XAxisLabel: Game Minute + YAxisLabel: Army Value LabelFont: TinyBold - AxisFont: Bold + AxisFont: TinyBold diff --git a/mods/ra/chrome/ingame-observer.yaml b/mods/ra/chrome/ingame-observer.yaml index 18bc4e4fc1..99bbf80659 100644 --- a/mods/ra/chrome/ingame-observer.yaml +++ b/mods/ra/chrome/ingame-observer.yaml @@ -579,62 +579,6 @@ Container@OBSERVER_WIDGETS: Text: Army Value Align: Right Shadow: True - Container@EARNED_THIS_MIN_GRAPH_HEADERS: - X: 0 - Y: 0 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - Children: - ColorBlock@HEADER_COLOR: - X: 0 - Y: 0 - Color: 00000090 - Width: PARENT_RIGHT - 200 - Height: PARENT_BOTTOM - GradientColorBlock@HEADER_GRADIENT: - X: PARENT_RIGHT - 200 - Y: 0 - TopLeftColor: 00000090 - BottomLeftColor: 00000090 - Width: 200 - Height: PARENT_BOTTOM - Label@EARNED_THIS_MIN_HEADER: - X: 0 - Y: 0 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - Text: Earnings received each minute - Align: Center - Shadow: True - Container@ARMY_THIS_MIN_GRAPH_HEADERS: - X: 0 - Y: 0 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - Children: - ColorBlock@HEADER_COLOR: - X: 0 - Y: 0 - Color: 00000090 - Width: PARENT_RIGHT - 200 - Height: PARENT_BOTTOM - GradientColorBlock@HEADER_GRADIENT: - X: PARENT_RIGHT - 200 - Y: 0 - TopLeftColor: 00000090 - BottomLeftColor: 00000090 - Width: 200 - Height: PARENT_BOTTOM - Label@EARNED_THIS_MIN_HEADER: - X: 0 - Y: 0 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - Text: Army value over time - Align: Center - Shadow: True ScrollPanel@PLAYER_STATS_PANEL: X: 0 Y: 54 @@ -1004,9 +948,9 @@ Container@OBSERVER_WIDGETS: Shadow: True Container@EARNED_THIS_MIN_GRAPH_CONTAINER: X: 0 - Y: 54 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - 65 + Y: 30 + Width: PARENT_RIGHT + Height: PARENT_BOTTOM Visible: False Children: ColorBlock@GRAPH_BACKGROUND: @@ -1025,15 +969,15 @@ Container@OBSERVER_WIDGETS: YAxisValueFormat: ${0:F0} XAxisSize: 20 YAxisSize: 10 - XAxisLabel: m - YAxisLabel: $ + XAxisLabel: Game Minute + YAxisLabel: Earnings LabelFont: TinyBold - AxisFont: Bold + AxisFont: TinyBold Container@ARMY_THIS_MIN_GRAPH_CONTAINER: X: 0 - Y: 54 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - 65 + Y: 30 + Width: PARENT_RIGHT + Height: PARENT_BOTTOM Visible: False Children: ColorBlock@GRAPH_BACKGROUND: @@ -1052,7 +996,7 @@ Container@OBSERVER_WIDGETS: YAxisValueFormat: ${0:F0} XAxisSize: 20 YAxisSize: 10 - XAxisLabel: m - YAxisLabel: $ + XAxisLabel: Game Minute + YAxisLabel: Army Value LabelFont: TinyBold - AxisFont: Bold + AxisFont: TinyBold diff --git a/mods/ts/chrome/ingame-observer.yaml b/mods/ts/chrome/ingame-observer.yaml index 11be6f60ae..3b0b1ca6b4 100644 --- a/mods/ts/chrome/ingame-observer.yaml +++ b/mods/ts/chrome/ingame-observer.yaml @@ -543,62 +543,6 @@ Container@OBSERVER_WIDGETS: Text: Army Value Align: Right Shadow: True - Container@EARNED_THIS_MIN_GRAPH_HEADERS: - X: 0 - Y: 0 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - Children: - ColorBlock@HEADER_COLOR: - X: 0 - Y: 0 - Color: 00000090 - Width: PARENT_RIGHT - 200 - Height: PARENT_BOTTOM - GradientColorBlock@HEADER_GRADIENT: - X: PARENT_RIGHT - 200 - Y: 0 - TopLeftColor: 00000090 - BottomLeftColor: 00000090 - Width: 200 - Height: PARENT_BOTTOM - Label@EARNED_THIS_MIN_HEADER: - X: 0 - Y: 0 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - Text: Earnings received each minute - Align: Center - Shadow: True - Container@ARMY_THIS_MIN_GRAPH_HEADERS: - X: 0 - Y: 0 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - Children: - ColorBlock@HEADER_COLOR: - X: 0 - Y: 0 - Color: 00000090 - Width: PARENT_RIGHT - 200 - Height: PARENT_BOTTOM - GradientColorBlock@HEADER_GRADIENT: - X: PARENT_RIGHT - 200 - Y: 0 - TopLeftColor: 00000090 - BottomLeftColor: 00000090 - Width: 200 - Height: PARENT_BOTTOM - Label@EARNED_THIS_MIN_HEADER: - X: 0 - Y: 0 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - Text: Army value over time - Align: Center - Shadow: True ScrollPanel@PLAYER_STATS_PANEL: X: 0 Y: 54 @@ -968,9 +912,9 @@ Container@OBSERVER_WIDGETS: Shadow: True Container@EARNED_THIS_MIN_GRAPH_CONTAINER: X: 0 - Y: 54 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - 65 + Y: 30 + Width: PARENT_RIGHT + Height: PARENT_BOTTOM Visible: False Children: ColorBlock@GRAPH_BACKGROUND: @@ -989,15 +933,15 @@ Container@OBSERVER_WIDGETS: YAxisValueFormat: ${0:F0} XAxisSize: 20 YAxisSize: 10 - XAxisLabel: m - YAxisLabel: $ + XAxisLabel: Game Minute + YAxisLabel: Earnings LabelFont: TinyBold - AxisFont: Bold + AxisFont: TinyBold Container@ARMY_THIS_MIN_GRAPH_CONTAINER: X: 0 - Y: 54 - Width: PARENT_RIGHT - 25 - Height: PARENT_BOTTOM - 65 + Y: 30 + Width: PARENT_RIGHT + Height: PARENT_BOTTOM Visible: False Children: ColorBlock@GRAPH_BACKGROUND: @@ -1016,7 +960,7 @@ Container@OBSERVER_WIDGETS: YAxisValueFormat: ${0:F0} XAxisSize: 20 YAxisSize: 10 - XAxisLabel: m - YAxisLabel: $ + XAxisLabel: Game Minute + YAxisLabel: Army Value LabelFont: TinyBold - AxisFont: Bold + AxisFont: TinyBold