private void DrawPerk(PersonPerkUiItem item, SpriteBatch spriteBatch) { var sourceRect = GetPerkIcon(item.Perk); spriteBatch.Draw(_uiContentStorage.GetAttributeBackgroundTexture(), new Vector2(item.UiRect.Left, item.UiRect.Top), Color.White); spriteBatch.Draw(_uiContentStorage.GetAttributeIconsTexture(), new Vector2(item.UiRect.Left, item.UiRect.Top), sourceRect, Color.White); var attributeTitle = GetPerkTitle(item.Perk); spriteBatch.DrawString( _uiContentStorage.GetButtonFont(), attributeTitle, new Vector2(item.UiRect.Right + ATTRIBUTE_ITEM_SPACING, item.UiRect.Top), new Color(195, 180, 155)); }
private void DrawAttribute(PersonStatUiItem item, SpriteBatch spriteBatch) { var sourceRect = GetAttributeIcon(item.Attribute.Type); spriteBatch.Draw(_uiContentStorage.GetAttributeBackgroundTexture(), new Vector2(item.UiRect.Left, item.UiRect.Top), Color.White); spriteBatch.Draw(_uiContentStorage.GetAttributeIconsTexture(), new Vector2(item.UiRect.Left, item.UiRect.Top), sourceRect, Color.White); var attributeTitle = GetAttributeTitle(item.Attribute); var attributeValue = GetAttributeTextValue(item.Attribute); spriteBatch.DrawString( _uiContentStorage.GetButtonFont(), $"{attributeTitle}: {attributeValue}", new Vector2(item.UiRect.Right + ATTRIBUTE_ITEM_SPACING, item.UiRect.Top), new Color(195, 180, 155)); }