Example #1
0
        public void Draw(Point displayLocation)
        {
            long timeRemaining = ExpireTime - CMain.Time;

            if (DamageLabel == null)
            {
                DamageLabel = new MirLabel
                {
                    AutoSize      = true,
                    BackColour    = Color.Transparent,
                    ForeColour    = Colour,
                    OutLine       = true,
                    OutLineColour = Color.Black,
                    Text          = Text,
                    Font          = new Font(Settings.FontName, 10F, FontStyle.Bold)
                };
                DamageLabel.Disposing += label_Disposing;

                MapObject.DamageLabelList.Add(DamageLabel);
            }

            displayLocation.Offset((int)(15 - (Text.Length * 3)), (int)(((int)((double)timeRemaining / Factor)) - Distance) - 75 - Offset);

            DamageLabel.Location = displayLocation;
            DamageLabel.Draw();
        }
Example #2
0
 void AutoPotPreview_AfterDraw(object sender, EventArgs e)
 {
     AmountLabel.Visible = Info != null;
     if (Info == null)
     {
         return;
     }
     AmountLabel.Text = CountItem(Info).ToString();
     Libraries.Items.Draw(Info.Image, DisplayLocation.Add(2, 3), Size, Color.White);
     AmountLabel.Draw();
 }
Example #3
0
        public virtual void DrawName()
        {
            CreateLabel();

            if (NameLabel == null)
            {
                return;
            }

            NameLabel.Text     = Name;
            NameLabel.Location = new Point(DisplayRectangle.X + (50 - NameLabel.Size.Width) / 2, DisplayRectangle.Y - (32 - NameLabel.Size.Height / 2) + (Dead ? 35 : 8)); //was 48 -
            NameLabel.Draw();
        }
Example #4
0
        public virtual void DrawName()
        {
            if (NameLabel == null || NameLabel.IsDisposed)
            {
                CreateLabel();
            }

            if (NameLabel != null)
            {
                NameLabel.Text = Name;
                Size S = PrimaryLibrary.GetSize(ImageIndex);
                NameLabel.Location = new Point(DisplayRectangle.X + (48 - NameLabel.Size.Width) / 2, DisplayRectangle.Y - (32 - NameLabel.Size.Height / 2) + (Dead ? 35 : 0));
                NameLabel.Draw();
            }
        }
Example #5
0
        public override void DrawName()
        {
            CreateLabel();

            if (NameLabel == null || OwnerLabel == null)
            {
                return;
            }

            NameLabel.Location = new Point(DisplayRectangle.X + (50 - NameLabel.Size.Width) / 2, DisplayRectangle.Y - (42 - NameLabel.Size.Height / 2) + (Dead ? 35 : 8));
            NameLabel.Draw();

            OwnerLabel.Location = new Point(DisplayRectangle.X + (50 - OwnerLabel.Size.Width) / 2, NameLabel.Location.Y + NameLabel.Size.Height - 1);
            OwnerLabel.Draw();
        }