public void Draw(SpriteBatch spriteBatch) { RenderHelpers.DrawMenuBox(_researchArea.bounds.X, _researchArea.bounds.Y, _researchArea.bounds.Width, _researchArea.bounds.Height, out var areaInnerAnchors); var researchItemCellX = areaInnerAnchors.X + _researchArea.bounds.Width / 2f - Game1.tileSize / 2f; RenderHelpers.DrawItemBox((int)researchItemCellX, (int)areaInnerAnchors.Y + 10, Game1.tileSize, Game1.tileSize, out _); var researchProgressString = GetItemProgression(); var progressFont = Game1.smallFont; var progressPositionX = areaInnerAnchors.X + _researchArea.bounds.Width / 2f - progressFont.MeasureString(researchProgressString).X / 2f; spriteBatch.DrawString(progressFont, researchProgressString, new Vector2(progressPositionX, areaInnerAnchors.Y + Game1.tileSize + 10), Color.Black); var buttonTexture = ModManager.Instance.ModMode switch { ModMode.Buy => _sellTexture, _ => _researchTexture }; spriteBatch.Draw(buttonTexture, _researchButton.bounds, _researchButton.sourceRect, Color.White); _researchItem?.drawInMenu(spriteBatch, new Vector2(researchItemCellX, areaInnerAnchors.Y + 10), 1f); }
public void Draw(SpriteBatch spriteBatch) { GetCurrentQualityIcon(out var texture, out var sourceRect, out var color); RenderHelpers.DrawMenuBox(_qualityButton.bounds.X, _qualityButton.bounds.Y, _qualityButton.bounds.Width - UIConstants.BorderWidth, _qualityButton.bounds.Height - UIConstants.BorderWidth, out var qualityIconPos); spriteBatch.Draw(texture, new Vector2(qualityIconPos.X, qualityIconPos.Y), sourceRect, color, 0, Vector2.Zero, Game1.pixelZoom, SpriteEffects.None, 1f); }
public void Draw(SpriteBatch spriteBatch) { RenderHelpers.DrawMenuBox(_searchBoxArea.bounds.X, _searchBoxArea.bounds.Y, _searchBoxArea.bounds.Width - UIConstants.BorderWidth, _searchBoxArea.bounds.Height - UIConstants.BorderWidth, out _); _searchBox.Draw(spriteBatch); spriteBatch.Draw(_searchIcon.texture, _searchIcon.bounds, _searchIcon.sourceRect, Color.White * _iconOpacity); }