public CrateStoneGump(CrateStone stone) : base() { m_Stone = stone; Closable = true; Disposable = true; Dragable = true; Resizable = false; AddPage(0); AddBackground(106, 102, 363, 265, 9200); AddBackground(171, 110, 219, 27, 9200); AddLabel(202, 115, 0x480, "Crate Race Control Center"); AddButton(385, 235, 241, 242, (int)Buttons.Canc, GumpButtonType.Reply, 0); AddButton(385, 265, 247, 248, (int)Buttons.Ok, GumpButtonType.Reply, 0); AddImageTiled(110, 150, 180, 70, 0xA40); AddAlphaRegion(110, 150, 180, 70); AddImageTiled(295, 150, 165, 70, 0xA40); AddAlphaRegion(295, 150, 165, 70); AddImageTiled(110, 225, 260, 85, 0xA40); AddAlphaRegion(110, 225, 260, 85); AddImageTiled(110, 315, 260, 40, 0xA40); AddAlphaRegion(110, 315, 260, 40); AddButton(300, 155, 4005, 4006, (int)Buttons.Build, GumpButtonType.Reply, 0); AddLabel(335, 155, 0x480, "Build RaceTrack"); AddButton(300, 180, 4005, 4006, (int)Buttons.Demolish, GumpButtonType.Reply, 0); AddLabel(335, 180, 0x480, "Demolish RaceTrack"); List<string> arr = new List<string>(); arr.Add("Crates:"); arr.Add(stone.Crates.ToString()); arr.Add("Participants:"); arr.Add(stone.Participants.ToString()); arr.Add("First Place:"); arr.Add(stone.FirstPlace); AddTable(120, 155, new int[] { 100, 80 }, arr, new string[2] { "FFFFFF", "FFFFFF" }); /*AddCheck(120, 230, 210, 211, false, (int)Buttons.Checklaps); AddLabel(150, 230, 0x480, "Laps"); AddTextEntry(245, 230, 103, 20, 0x480, (int)Buttons.Entrylaps, stone.Laps.ToString()); AddCheck(120, 255, 210, 211, false, (int)Buttons.Checkcrates); AddLabel(150, 255, 0x480, "Crates"); AddTextEntry(245, 255, 91, 20, 0x480, (int)Buttons.Entrycrates, stone.MaxCrates.ToString()); */ AddButton(120, 230, 4005, 4006, (int)Buttons.Settings, GumpButtonType.Reply, 0); AddLabel(155, 230, 0x480, "Change Settings"); if (m_Stone.Rectangles.Count > 0) { AddButton(120, 255, 4005, 4006, (int)Buttons.ShowRects, GumpButtonType.Reply, 0); AddLabel(155, 255, 0x480, "Show Regions"); } AddButton(120, 280, 4005, 4006, (int)Buttons.NewRects, GumpButtonType.Reply, 0); AddLabel(155, 280, 0x480, "Set New Regions"); AddRadio(120, 325, 208, 209, false, (int)Buttons.Radiostart); AddLabel(140, 325, 0x480, "Start"); AddRadio(245, 325, 208, 209, false, (int)Buttons.Radiostop); AddLabel(265, 325, 0x480, "Stop"); }
public CRSGump(CrateStone stone) : base() { m_Stone = stone; Closable = true; Disposable = true; Dragable = true; Resizable = false; AddBackground(100, 100, 250, 300, 9200); AddBackground(125, 115, 200, 25, 9200); AddLabel(160, 115, 0x480, "Crate Race Settings"); /*AddAlphaRegion(110, 158, 104, 18); AddAlphaRegion(216, 158, 112, 17);*/ List<string> arr = new List<string>(); arr.Add("Laps:"); arr.Add(""); arr.Add("Max. Crates:"); arr.Add(""); arr.Add("Gates Open:"); arr.Add(""); arr.Add("Gateprice:"); arr.Add(""); arr.Add("Props for more"); arr.Add("options!"); AddTable(110, 155, new int[2] { 100, 120 }, arr, new string[2] { "333333", "FFFFFF" }, 100, 2); AddTextEntry(217, 156, 103, 20, 0x480, (int)Buttons.Entrylaps, stone.Laps.ToString()); AddTextEntry(217, 174, 103, 20, 0x480, (int)Buttons.EntryCrates, stone.MaxCrates.ToString()); //AddTextEntry(217, 192, 103, 20, 0x480, (int)Buttons.EntryGates, stone.GatesInterval.ToString()); AddTextEntry(217, 210, 103, 20, 0x480, (int)Buttons.EntryGateprice, stone.Price.ToString()); AddButton(257, 350, 247, 248, (int)Buttons.Ok, GumpButtonType.Reply, 0); AddButton(145, 350, 241, 242, (int)Buttons.Canc, GumpButtonType.Reply, 0); }
public RectangleSetup(Mobile m, CrateStone stone, bool haslist) { m_Mobile = m; m_Stone = stone; if (haslist) { m_List = stone.Rectangles; ChangeNumber(m_List.Count - 1); } else BoundingBoxPicker.Begin(m, new BoundingBoxCallback(NewRegion_Callback), 0); }
public static void Start(CrateStone stone) { m_StartTime = 5; Map = stone.Map; X = stone.X; Y = stone.Y; Z = stone.Z; Rewards = stone.Rewards; StoneLocation = stone.Location; Animalised = stone.Animalised; QuickSpeed = stone.QuickSpeed; MaxCrates = stone.MaxCrates; Price = stone.Price; Laps = stone.Laps; MinutesOpen = stone.MinutesOpen; Rectangles = stone.Rectangles; m_Region = new CrateRegion(stone.RegionRect, Map); m_Region.Register(); Running = true; EventSystem.Start(MinutesOpen, Name, new EDC.StartMethod(StartNewRace), new EDC.StopMethod(StopRace), new EDC.JoinMethod(RequestJoin)); }