Beispiel #1
0
 public UOMapControl()
 {
     Active            = false;
     this.prevPoint    = new Point(0, 0);
     this.BorderStyle  = BorderStyle.Fixed3D;
     this.m_MapButtons = new ArrayList();
     m_Regions         = Assistant.MapUO.Region.Load("guardlines.def");
     m_MapButtons      = UOMapRuneButton.Load("test.xml");
 }
Beispiel #2
0
 public UOMapControl()
 {
     Active            = false;
     this.prevPoint    = new Point(0, 0);
     this.BorderStyle  = BorderStyle.Fixed3D;
     this.m_MapButtons = new ArrayList();
     m_Regions         = Assistant.MapUO.Region.Load(Path.Combine(Config.GetInstallDirectory(), "guardlines.def"));
     m_MapButtons      = UOMapRuneButton.Load("test.xml");
 }
Beispiel #3
0
 public void MapClick(System.Windows.Forms.MouseEventArgs e)
 {
     if (Active)
     {
         Point           clickedbox = MousePointToMapPoint(new Point(e.X, e.Y));
         UOMapRuneButton button     = ButtonCheck(new Rectangle(clickedbox.X - 2, clickedbox.Y - 2, 5, 5));
         if (button != null)
         {
             button.OnClick(e);
         }
     }
 }
Beispiel #4
0
        private ArrayList ButtonList(int x, int y, int maxDist)
        {
            if (this.m_MapButtons == null)
            {
                return(null);
            }
            int       count = this.m_MapButtons.Count;
            ArrayList aList = new ArrayList();

            for (int i = 0; i < count; i++)
            {
                UOMapRuneButton btn = (UOMapRuneButton)this.m_MapButtons[i];
                if (Utility.Distance(btn.X, btn.Y, x, y) <= maxDist * 2)
                {
                    aList.Add(btn);
                }
            }
            return(aList);
        }