Пример #1
0
        internal override void Draw(GameTime gameTime, NeoBatch guiBatch)
        {
            if (IsClipped != true)
            {
                if (anim < 1f)
                {
                    anim += (float)gameTime.ElapsedGameTime.TotalSeconds * 15;
                }

                guiBatch.Draw(new Block {
                    Position = Bounds.Location.ToVector2(),
                    Size     = Bounds.Size.ToVector2(),
                    Color    = Color.Lerp(Color.Gray, new Color(0.9f, 0.3f, 0.0f, 1f), Checked ? anim : 1 - anim),                  // Checked ? Color.Gray.ToVector4() : Color.MediumSpringGreen.ToVector4(),
                    Radius   = Bounds.Height / 2
                });


                guiBatch.Draw(new Block {
                    Position = Bounds.Location.ToVector2() + new Vector2(Checked ? (Bounds.Height * 1.125f) * anim: (Bounds.Height * .125f) + ((Bounds.Height * 1.125f) - (anim * (Bounds.Height * 1.125f))), (Bounds.Height * .125f)),
                    Size     = new Vector2(Bounds.Height * .75f),
                    Color    = Color.White,
                    Radius   = Bounds.Height * .375f
                });
            }
        }
Пример #2
0
        internal override void Draw(GameTime gameTime, NeoBatch guiBatch)
        {
            if (IsClipped != true)
            {
                guiBatch.Draw(new Block()
                {
                    Color = Color.Aquamarine, Position = Bounds.Location.ToVector2(), Radius = 5, Size = Bounds.Size.ToVector2()
                });

                foreach (Control c in this)
                {
                    c.Draw(gameTime, guiBatch);
                }
            }
        }
Пример #3
0
        internal override void Draw(GameTime gameTime, NeoBatch guiBatch)
        {
            if (anim < 1f)
            {
                anim += (float)gameTime.ElapsedGameTime.TotalSeconds * 8;
            }

            if (IsClipped != true)
            {
                guiBatch.Draw(new Block
                {
                    Position = Bounds.Location.ToVector2() + new Vector2(0, 10 - 10 * anim),
                    Size     = Bounds.Size.ToVector2(),
                    Color    = Color.Lerp(Color.Gray, new Color(0.9f, 0.3f, 0.0f, 1f), anim),
                    Radius   = 4 + ((1 - anim) * 10)
                });

                if (_neo != null)
                {
                    guiBatch.DrawString(Text, Bounds.Location.ToVector2() + new Vector2(10, 5 + (10 - 10 * anim)), 22f, Color.White);
                }
            }
        }