Esempio n. 1
0
        /// <summary>
        /// Initializes the drawings.
        /// </summary>
        public override void InitDrawings()
        {
            Rectangle = new Rectangle_Ex((int)this.Position.X, (int)this.Position.Y, (int)this.Width, (int)this.Height, Color.DodgerBlue)
            {
                VisibleCondition = delegate
                { return(HudVariables.ShouldBeVisible && HudVariables.CurrentStatus == SpriteStatus.Expanded); }
            };

            Text = new Render.Text(
                (int)(this.Position.X + this.Width / 2f - Helper.GetSize(this.Name, 17)), (int)this.Position.Y - 9,
                this.Name, 17, Color.White)
            {
                VisibleCondition = delegate
                {
                    return(HudVariables.ShouldBeVisible && HudVariables.CurrentStatus == SpriteStatus.Expanded);
                },
                Centered = true
            };

            Rectangle.Add(2);
            Text.Add(2);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes the drawings.
        /// </summary>
        public override void InitDrawings()
        {
            Rectangle = new Rectangle_Ex((int)this.Position.X, (int)this.Position.Y, (int)this.Width, (int)this.Height, Color.DodgerBlue)
            {
                VisibleCondition = delegate
                { return HudVariables.ShouldBeVisible && HudVariables.CurrentStatus == SpriteStatus.Expanded; }
            };

            Text = new Render.Text(
                (int) (this.Position.X + this.Width / 2f - Helper.GetSize(this.Name, 17)), (int) this.Position.Y - 9,
                this.Name, 17, Color.White)
            {
                VisibleCondition = delegate
                {
                    return HudVariables.ShouldBeVisible && HudVariables.CurrentStatus == SpriteStatus.Expanded;
                },
                Centered = true
            };

            Rectangle.Add(2);
            Text.Add(2);
        }