protected internal override void OnMouseMove(int X, int Y, MouseButtons mb) { if (((mb & MouseButtons.Right) != MouseButtons.None) && Engine.amMoving) { Point point = base.PointToScreen(new Point(X, Y)); int distance = 0; Engine.movingDir = Engine.GetDirection(point.X, point.Y, ref distance); } }
protected internal override void OnMouseDown(int x, int y, MouseButtons mb) { if ((mb & MouseButtons.Right) != MouseButtons.None) { Point point = base.PointToScreen(new Point(x, y)); int distance = 0; Engine.movingDir = Engine.GetDirection(point.X, point.Y, ref distance); Engine.amMoving = true; } }
protected internal override void OnMouseDown(int x, int y, MouseButtons mb) { if (((mb & MouseButtons.Right) != MouseButtons.None) && ((Control.ModifierKeys & Keys.Shift) == Keys.None)) { Point point = base.PointToScreen(new Point(x, y)); int distance = 0; Engine.movingDir = Engine.GetDirection(point.X, point.Y, ref distance); Engine.amMoving = true; } else { base.BringToTop(); } }
protected void Render(int X, int Y, int xTarget, int yTarget) { Mobile player = World.Player; if (player != null) { if ((this.m_xLast != xTarget) || (this.m_yLast != yTarget)) { int num3; Direction direction = Engine.GetDirection(player.X, player.Y, xTarget, yTarget); string str = m_DirectionStrings[(int)(Direction.West & direction)]; int num = Math.Abs((int)(xTarget - player.X)); int num2 = Math.Abs((int)(yTarget - player.Y)); if (num > num2) { num3 = num2 + (num - num2); } else { num3 = num + (num2 - num); } int index = (num3 - 2) / 2; if (index < 0) { index = 0; } else if (index > 6) { index = 6; } string str2 = (num3 == 1) ? this.GetSingularString(str) : this.GetPluralString(str, num3); this.Hue = m_Hues[index]; this.Text = str2; } base.Render(X, Y); Stats.Add(this); } }