示例#1
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            var pos = GetDimensions().ToRectangle().TopLeft();

            if (output != null)
            {
                var tex = GetTexture(output.Texture);
                output.Draw(spriteBatch, pos + Vector2.One * 16, 1, false);
                var color = (Parent.Parent.Parent as InfusionMaker).selected == this ? Color.Yellow : Color.White;
                spriteBatch.DrawString(Main.fontItemStack, output.item.Name, pos + new Vector2(38, 8), color, 0, Vector2.Zero, 0.8f, 0, 0);
            }
        }
示例#2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            var pos = GetDimensions().ToRectangle().TopLeft();

            if (output != null)
            {
                if (output.Visible)
                {
                    var tex = GetTexture(output.Texture);
                    output.Draw(spriteBatch, pos + new Vector2(14, 13), 1, false);
                    var color = (Parent.Parent.Parent as InfusionMaker).selected == this ? Color.Yellow : Color.White;
                    spriteBatch.DrawString(Main.fontItemStack, output.item.Name, pos + new Vector2(32, 6), color, 0, Vector2.Zero, 0.8f, 0, 0);
                }
                else
                {
                    var tex = GetTexture(output.FrameTexture);
                    spriteBatch.Draw(tex, pos, Color.Gray);
                    spriteBatch.DrawString(Main.fontItemStack, "???", pos + new Vector2(32, 6), Color.Gray, 0, Vector2.Zero, 0.8f, 0, 0);
                }
            }
        }