Example #1
0
        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();
        }
Example #2
0
 private string GetStatisticsString(Statistics statistics, ActorResourceTypes resourceType)
 {
     return string.Join("\n", statistics
         .OrderBy(x => x.Name)
         .Select(x => x.ToItemTooltipString())
         .ToArray());
 }
Example #3
0
        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;
        }
Example #4
0
        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;
        }