Updated menu drawing. Now to fix the scale size of the object

This commit is contained in:
2018-06-13 12:08:14 -07:00
parent bcf76f9163
commit 701823925f
1 changed files with 11 additions and 5 deletions

View File

@ -192,14 +192,20 @@ namespace StardustCore.Objects
public override void drawInMenu(SpriteBatch spriteBatch, Vector2 location, float scaleSize, float transparency, float layerDepth, bool drawStackNumber, Color c, bool drawShadows)
{
if (animationManager == null) spriteBatch.Draw(this.TextureSheet.getTexture(), location,this.defaultSourceRect, Color.White * transparency, 0f, new Vector2(0,0), scaleSize, SpriteEffects.None, layerDepth);
foreach (var v in this.objects)
{
if (animationManager == null)
{
spriteBatch.Draw(v.Value.getExtendedTexture().getTexture(), location+new Vector2(v.Key.X*16,v.Key.Y*16), this.defaultSourceRect, Color.White * transparency, 0f, new Vector2(0, 0), 1, SpriteEffects.None, layerDepth);
}
else
{
spriteBatch.Draw(animationManager.getTexture(), location, animationManager.currentAnimation.sourceRectangle, Color.White * transparency, 0f, new Vector2(0,0), scaleSize, SpriteEffects.None, layerDepth);
spriteBatch.Draw(v.Value.animationManager.getTexture(), location + new Vector2(v.Key.X*8, v.Key.Y*8), v.Value.animationManager.currentAnimation.sourceRectangle, Color.White * transparency, 0f, new Vector2(0, 0), scaleSize, SpriteEffects.None, layerDepth);
//this.modularCrop.drawInMenu(spriteBatch, location + new Vector2((float)(Game1.tileSize / 2), (float)(Game1.tileSize / 2)), Color.White, 0f,true);
if (Game1.player.CurrentItem != this) animationManager.tickAnimation();
}
}
}
public override Color getCategoryColor()
{