public static string GetStatisticsString(Statistics statistics, ActorResourceTypes resourceType, bool hideZero) { StringBuilder sb = new StringBuilder(); foreach (var stat in statistics.OrderBy(x => x.Name)) { sb.AppendLine(stat.Name + ": " + stat.ToValueString()); } return sb.ToString(); }
private string GetStatisticsString(Statistics statistics, ActorResourceTypes resourceType) { return string.Join("\n", statistics .OrderBy(x => x.Name) .Select(x => x.ToItemTooltipString()) .ToArray()); }
public int DrawUpgradeStatistics(Statistics statistics, int x, int y) { foreach (var stat in statistics.OrderBy(s => s.Name)) { var text = stat.ToItemUpgradeString(); if (!string.IsNullOrWhiteSpace(text)) { SpriteBatch.DrawString(Font, text, new Vector2(x, y), stat.Color, ZIndex + 0.003f); y += (int)Font.MeasureString(text).Y; } } return y; }
public int DrawStatistics(Statistics statistics, int x, int y, bool hideZero) { foreach (var stat in statistics.OrderBy(s => s.Name)) { var text = stat.ToItemTooltipString(); SpriteBatch.DrawString(Font, text, new Vector2(x, y), Color.LightYellow, ZIndex + 0.003f); y += (int)Font.MeasureString(text).Y; } return y; }