예제 #1
0
        public ArenaAreaGump(ArenaControl r)
            : base(25, 250)
        {
            m_Control = r;

            Closable=true;
            Dragable=true;
            Resizable=false;

            AddPage(0);
            AddBackground(23, 32, 412, 256, 9270);
            AddAlphaRegion(19, 29, 418, 263);

            AddLabel(186, 45, 1152, "REMOVE AREA");

            //+25 between 'em.

            int itemsThisPage = 0;
            int nextPageNumber = 1;

            if (r.ArenaArea != null)
            {
                for (int i = 0; i < r.ArenaArea.Length; i++)
                {
                    Rectangle3D rect = ((Rectangle3D)r.ArenaArea[i]);

                    if (itemsThisPage >= 8 || itemsThisPage == 0)
                    {
                        itemsThisPage = 0;

                        if (nextPageNumber != 1)
                        {
                            AddButton(393, 45, 4007, 4009, 0, GumpButtonType.Page, nextPageNumber);
                            //Forward button -> #0
                        }

                        AddPage(nextPageNumber++);

                        if (nextPageNumber != 2)
                        {
                            AddButton(35, 45, 4014, 4016, 1, GumpButtonType.Page, nextPageNumber - 2);
                            //Back Button -> #1
                        }
                    }

                    AddButton(70, 75 + 25 * itemsThisPage, 4017, 4019, 100 + i, GumpButtonType.Reply, 0);
                    //Button is 100 + i

                    //AddLabel(116, 77 + 25*i, 0, "(1234, 5678)");
                    AddLabel(116, 77 + 25 * itemsThisPage, 1152, String.Format("({0}, {1}, {2})", rect.Start.X, rect.Start.Y, rect.Start.Z));

                    AddLabel(232, 78 + 25 * itemsThisPage, 1152, "<-->");

                    //AddLabel(294, 77 + 25*i, 0, "(9876, 5432)");
                    AddLabel(294, 77 + 25 * itemsThisPage, 1152, String.Format("({0}, {1}, {2})", rect.End.X, rect.End.Y, rect.End.Z));

                    itemsThisPage++;
                }
            }
        }
예제 #2
0
 public ArenaSetGump(Mobile from, ArenaControl arena, int page)
     : this()
 {
     caller = from;
     a = arena;
     TypeInfo(page);
 }
예제 #3
0
 public ArenaTypeGump(Mobile from, ArenaControl arena)
     : this()
 {
     caller = from;
     a = arena;
     TypeInfo();
 }
예제 #4
0
 public ArenaPlacementGump(Mobile from, ArenaControl arena, List<Point3D> list)
     : this()
 {
     caller = from;
     a = arena;
     points = list;
     PlacementInfo();
 }
예제 #5
0
 public SingleTarget(ArenaControl arena, int location)
     : base(10, true, TargetFlags.None)
 {
     a = arena;
     loc = location;
 }
예제 #6
0
 public SpectatorRegion(ArenaControl control)
     : base(control.Set+control.Name, Map.Felucca, Region.DefaultPriority, control.SpectatorArea)
 {
     m_Controller = control;
 }
예제 #7
0
 public MatchTimer(TournamentTimer tournament, ArenaControl arena, Match bout)
     : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
 {
     Priority = TimerPriority.OneSecond;
     t = tournament;
     b = bout;
     a = arena;
     a.Occupied = true;
     countdown = 6;
     started = false;
     cfinished = false;
     staging = TimeSpan.FromSeconds(30.0);
     announcer = getAnn();
     BeginStage();
 }
예제 #8
0
        /// <summary>
        /// Determines if there is an unoccupied arena and sets it to be
        /// the next arena to be used
        /// </summary>
        /// <returns></returns>
        public bool HaveUnoccupiedArena()
        {
            m_NextArena = null;

            foreach (ArenaControl arena in m_Arenas)
            {
                if (!arena.Occupied)
                {
                    m_NextArena = arena;
                    break;
                }
            }

            return m_NextArena != null;
        }
예제 #9
0
 public SingleTarget(ArenaControl arena, List<Point3D> list, int location)
     : base(10, true, TargetFlags.None)
 {
     a = arena;
     loc = location;
     l = list;
 }
예제 #10
0
 public ArenaRegion(ArenaControl control)
     : base(control.Name, Map.Felucca, Region.DefaultPriority+10, control.ArenaArea)
 {
     m_Controller = control;
 }