Esempio n. 1
0
        public AllianceInterface(Mobile from, InterfaceKey interfaceKey) : base(50, 50)
        {
            key = interfaceKey;

            if (AllianceDefinition.Alliances.Count > 0)
            {
                foreach (BaseAlliance a in AllianceDefinition.Alliances)
                {
                    alliancesToParse.Add(a);
                }

                currentAllianceParsed = alliancesToParse[key.Value];

                this.Closable   = true;
                this.Disposable = true;
                this.Dragable   = true;
                this.Resizable  = false;

                this.AddPage(0);
                this.AddBackground(23, 15, 459, 278, 9250);
                this.AddAlphaRegion(39, 32, 194, 54);
                this.AddLabel(111, 48, currentAllianceParsed.primaryHue - 1, currentAllianceParsed.AllianceName);
                this.AddButton(230, 258, 2468, 2466, (int)Buttons.Previous, GumpButtonType.Reply, 0);
                this.AddButton(406, 257, 2469, 2470, (int)Buttons.Next, GumpButtonType.Reply, 0);
                this.AddImage(41, 36, 8481);
                this.AddLabel(47, 257, 0, @"Alliance Limit: ");
                this.AddTextEntry(135, 257, 29, 20, 0, (int)Buttons.AllianceLimitEntry, AllianceDefinition.AllianceLimit.ToString());
                this.AddLabel(85, 98, 0, @"Member Count: " + currentAllianceParsed.membersOf.Count);
                this.AddButton(325, 258, 2463, 2461, (int)Buttons.Delete, GumpButtonType.Reply, 0);
                this.AddLabel(71, 119, 0, @"Cities Controlled: " + currentAllianceParsed.CitiesControlled);
                this.AddLabel(71, 141, 0, @"Collective Points: " + currentAllianceParsed.CollectivePoints);
                this.AddLabel(44, 162, 0, @"Total Silver Amassed: " + currentAllianceParsed.TotalSilverGathered);
                this.AddLabel(291, 37, 0, @"Primary Hue:");
                this.AddTextEntry(382, 36, 52, 20, 0, (int)Buttons.PrimeHueEntry, currentAllianceParsed.primaryHue.ToString());
                this.AddLabel(277, 63, 0, @"Secondary Hue:");
                this.AddTextEntry(382, 63, 52, 20, 0, (int)Buttons.SecondHueEntry, currentAllianceParsed.secondaryHue.ToString());
                this.AddButton(444, 37, 1209, 1210, (int)Buttons.PrimeHueButton, GumpButtonType.Reply, 0);
                this.AddButton(444, 67, 1209, 1210, (int)Buttons.SecondHueButton, GumpButtonType.Reply, 0);
                this.AddButton(173, 261, 1209, 1210, (int)Buttons.AllianceLimitButton, GumpButtonType.Reply, 0);
                this.AddLabel(41, 223, 0, @"Total Alliances: " + alliancesToParse.Count);
                this.AddImage(432, 188, 9005);
            }

            else
            {
                from.SendMessage("There are currently no alliances with which to interface.");
            }
        }
Esempio n. 2
0
 public static void AllyInterface_Command(CommandEventArgs args)
 {
     InterfaceKey key = new InterfaceKey();
     args.Mobile.SendGump(new AllianceInterface(args.Mobile, key));
 }
Esempio n. 3
0
        public AllianceInterface(Mobile from, InterfaceKey interfaceKey) : base(50, 50)
        {
             key = interfaceKey;

            if (AllianceDefinition.Alliances.Count > 0)
            {
                foreach (BaseAlliance a in AllianceDefinition.Alliances)
                    alliancesToParse.Add(a);

                currentAllianceParsed = alliancesToParse[key.Value];

                this.Closable = true;
                this.Disposable = true;
                this.Dragable = true;
                this.Resizable = false;

                this.AddPage(0);
                this.AddBackground(23, 15, 459, 278, 9250);
                this.AddAlphaRegion(39, 32, 194, 54);
                this.AddLabel(111, 48, currentAllianceParsed.primaryHue -1, currentAllianceParsed.AllianceName);
                this.AddButton(230, 258, 2468, 2466, (int)Buttons.Previous, GumpButtonType.Reply, 0);
                this.AddButton(406, 257, 2469, 2470, (int)Buttons.Next, GumpButtonType.Reply, 0);
                this.AddImage(41, 36, 8481);
                this.AddLabel(47, 257, 0, @"Alliance Limit: ");
                this.AddTextEntry(135, 257, 29, 20, 0, (int)Buttons.AllianceLimitEntry, AllianceDefinition.AllianceLimit.ToString());
                this.AddLabel(85, 98, 0, @"Member Count: " + currentAllianceParsed.membersOf.Count);
                this.AddButton(325, 258, 2463, 2461, (int)Buttons.Delete, GumpButtonType.Reply, 0);
                this.AddLabel(71, 119, 0, @"Cities Controlled: " + currentAllianceParsed.CitiesControlled);
                this.AddLabel(71, 141, 0, @"Collective Points: " + currentAllianceParsed.CollectivePoints);
                this.AddLabel(44, 162, 0, @"Total Silver Amassed: " + currentAllianceParsed.TotalSilverGathered);
                this.AddLabel(291, 37, 0, @"Primary Hue:");
                this.AddTextEntry(382, 36, 52, 20, 0, (int)Buttons.PrimeHueEntry, currentAllianceParsed.primaryHue.ToString());
                this.AddLabel(277, 63, 0, @"Secondary Hue:");
                this.AddTextEntry(382, 63, 52, 20, 0, (int)Buttons.SecondHueEntry, currentAllianceParsed.secondaryHue.ToString());
                this.AddButton(444, 37, 1209, 1210, (int)Buttons.PrimeHueButton, GumpButtonType.Reply, 0);
                this.AddButton(444, 67, 1209, 1210, (int)Buttons.SecondHueButton, GumpButtonType.Reply, 0);
                this.AddButton(173, 261, 1209, 1210, (int)Buttons.AllianceLimitButton, GumpButtonType.Reply, 0);
                this.AddLabel(41, 223, 0, @"Total Alliances: " + alliancesToParse.Count);
                this.AddImage(432, 188, 9005);
            }

            else from.SendMessage("There are currently no alliances with which to interface.");
        }
Esempio n. 4
0
        public static void AllyInterface_Command(CommandEventArgs args)
        {
            InterfaceKey key = new InterfaceKey();

            args.Mobile.SendGump(new AllianceInterface(args.Mobile, key));
        }