Exemplo n.º 1
0
 private static TopicMetadata Ufo(UfoType ufo)
 {
     return new TopicMetadata
     {
         Name = ufo.Metadata().Name,
         Category = TopicCategory.Ufos,
         Background = Backgrounds.InfoUfo,
         BackgroundPalette = 0,
         Scheme = ColorScheme.Aqua,
         RequiredResearch = new[] { ufo.Metadata().RequiredResearch },
         Subject = ufo
     };
 }
Exemplo n.º 2
0
		private void AddTopicControls(UfoType ufo)
		{
			var metadata = ufo.Metadata();
			AddControl(new Label(24, 5, metadata.Name, Font.Large, ColorScheme.Aqua));
			AddControl(new UfoPreview(6, 160, metadata.Image));

			var nextTop = 68;
			var stats = new[]
			{
				Tuple.Create("Damage Capacity", metadata.DamageCapacity.FormatNumber()),
				Tuple.Create("Weapon Power", metadata.WeaponPower.FormatNumber()),
				Tuple.Create("Weapon Range", metadata.WeaponRange.FormatNumber()),
				Tuple.Create("Maximum Speed", $"{metadata.MaximumSpeed.FormatNumber()}\tknots")
			};
			foreach (var stat in stats)
			{
				var top = nextTop;
				nextTop += 16;
				AddControl(new ExtendedLabel(top, 10, 180, stat.Item1, Font.Large, ColorScheme.Aqua));
				AddControl(new Label(top, 190, stat.Item2, Font.Large, ColorScheme.Aqua));
			}
			AddControl(new WrappedLabel(140, 10, 300, metadata.Description, Font.Normal, ColorScheme.Aqua));
		}