Ejemplo n.º 1
0
        public void DrawName(Point OffSet)
        {
            if (NameLabel == null || NameLabel.IsDisposed)
            {
                CreateLabel();
            }

            NameLabel.BackColor = Color.FromArgb(100, 0, 24, 48);
            NameLabel.Border    = true;
            //NameLabel.OutLine = false;

            if (NameLabel != null)
            {
                Size S = PrimaryLibrary.GetSize(ImageIndex);
                NameLabel.Location = new Point(
                    DisplayRectangle.X + OffSet.X + (DisplayRectangle.Width - NameLabel.Size.Width) / 2,
                    DisplayRectangle.Y + OffSet.Y + (DisplayRectangle.Height - NameLabel.Size.Height) / 2 - 20);
                NameLabel.Draw();
            }
        }
Ejemplo n.º 2
0
        public override void DrawName()
        {
            if (NameLabel == null || NameLabel.IsDisposed)
            {
                CreateLabel();
            }

            NameLabel.BackColor = Color.Transparent;
            NameLabel.Border    = false;
            NameLabel.OutLine   = true;

            if (NameLabel != null)
            {
                Size S = PrimaryLibrary.GetSize(ImageIndex);
                NameLabel.Location = new Point(
                    DisplayRectangle.X + (DisplayRectangle.Width - NameLabel.Size.Width) / 2,
                    DisplayRectangle.Y + (DisplayRectangle.Height - NameLabel.Size.Height) / 2 - 20);
                NameLabel.Draw();
            }
        }
Ejemplo n.º 3
0
        }                                       //Sparkle?

        public override void LocationProcess()
        {
            if (PrimaryLibrary != null)
            {
                #region Display Rectangle

                DisplayRectangle.Size = PrimaryLibrary.GetSize(ImageIndex);

                DisplayRectangle.Location = new Point(
                    (Location.X - MapObject.User.MovePoint.X + Settings.PlayerOffSet.X) * Globals.CellWidth + MapObject.User.MovingOffSet.X,
                    (Location.Y - MapObject.User.MovePoint.Y + Settings.PlayerOffSet.Y) * Globals.CellHeight + MapObject.User.MovingOffSet.Y);
                #endregion

                DisplayRectangle.X += (Globals.CellWidth - DisplayRectangle.Width) / 2;
                DisplayRectangle.Y += (Globals.CellHeight - DisplayRectangle.Height) / 2;

                FinalDisplayLocation = DisplayRectangle.Location;
            }
            else
            {
                DisplayRectangle     = Rectangle.Empty;
                FinalDisplayLocation = Point.Empty;
            }
        }