private void AddTopicControls(EquipmentType equipment) { var metadata = equipment.Metadata(); AddControl(new Item(4 + 8 * (3 - metadata.Height), 158 + 8 * (2 - metadata.Width), metadata.Image)); AddControl(new WrappedLabel(24, 5, 150, metadata.Name, Font.Large, ColorScheme.White)); var nextTop = 67; foreach (var descriptionLine in metadata.DescriptionLines) { var top = nextTop; nextTop += 8; AddControl(new Label(top, 8, descriptionLine, Font.Normal, ColorScheme.White)); } }
private static TopicMetadata Equipment(EquipmentType equipment, params ResearchType[] requiredResearch) { return new TopicMetadata { Name = equipment.Metadata().Name, Category = TopicCategory.WeaponsAndEquipment, Background = Backgrounds.InfoItem, BackgroundPalette = 4, Scheme = ColorScheme.Yellow, RequiredResearch = requiredResearch, Subject = equipment }; }
private static BattleItemMetadata MetadataOf(EquipmentType equipmentType) => equipmentType.Metadata();