Ejemplo n.º 1
0
 private static TopicMetadata HeavyWeaponsPlatform(HwpType hwp, params ResearchType[] requiredResearch)
 {
     return new TopicMetadata
     {
         Name = hwp.Metadata().Name,
         Category = TopicCategory.HeavyWeaponsPlatforms,
         Background = Backgrounds.InfoMission,
         BackgroundPalette = 3,
         Scheme = ColorScheme.LightWhite,
         RequiredResearch = requiredResearch,
         Subject = hwp
     };
 }
Ejemplo n.º 2
0
		private void AddTopicControls(HwpType hwp)
		{
			var metadata = hwp.Metadata();
			AddControl(new Label(24, 5, metadata.Name, Font.Large, ColorScheme.LightAqua));

			var nextTop = 45;
			var stats = new[]
			{
				Tuple.Create("TIME UNITS", metadata.TimeUnits.FormatNumber()),
				Tuple.Create("HEALTH", metadata.Health.FormatNumber()),
				Tuple.Create("Front Armor", metadata.FrontArmor.FormatNumber()),
				Tuple.Create("Left Armor", metadata.LeftArmor.FormatNumber()),
				Tuple.Create("Right Armor", metadata.RightArmor.FormatNumber()),
				Tuple.Create("Rear Armor", metadata.RearArmor.FormatNumber()),
				Tuple.Create("Under Armor", metadata.UnderArmor.FormatNumber()),
				Tuple.Create("Weapon", metadata.DamageType.Metadata().Name),
				Tuple.Create("Weapon Power", metadata.Damage.FormatNumber()),
				Tuple.Create("Ammunition", metadata.Ammunition?.Metadata().Name),
				Tuple.Create("Rounds", metadata.Rounds == 0 ? null : metadata.Rounds.FormatNumber())
			};
			foreach (var stat in stats.Where(stat => stat.Item2 != null))
			{
				var top = nextTop;
				nextTop += 8;
				AddControl(new ExtendedLabel(top, 10, 175, stat.Item1, Font.Normal, ColorScheme.LightAqua));
				AddControl(new Label(top, 185, stat.Item2, Font.Normal, ColorScheme.LightAqua));
			}
			nextTop += 2;
			foreach (var descriptionLine in metadata.DescriptionLines)
			{
				var top = nextTop;
				nextTop += 8;
				AddControl(new Label(top, 10, descriptionLine, Font.Normal, ColorScheme.LightPurple));
			}
		}