Example #1
0
        public CreateWorldGump(CommandEventArgs e, CreateWorld.GumpType type)
            : base(50, 50)
        {
            m_Type             = type;
            m_CommandEventArgs = e;
            Closable           = true;
            Dragable           = true;

            AddPage(1);

            int items = CreateWorld.Commands.Count;

            if (!Server.Factions.Settings.Enabled)
            {
                items--;
            }

            AddBackground(0, 0, 280, 75 + items * 25, 5054);
            switch (m_Type)
            {
            case CreateWorld.GumpType.Create:
                AddLabel(40, 2, 200, "CREATE WORLD GUMP");
                break;

            case CreateWorld.GumpType.Delete:
                AddLabel(40, 2, 200, "DELETE WORLD GUMP");
                break;

            case CreateWorld.GumpType.Recreate:
                AddLabel(40, 2, 200, "RECREATE WORLD GUMP");
                break;
            }

            AddImageTiled(10, 20, 220, 10 + items * 25, 3004);
            int y = 25;

            foreach (CreateWorld.CommandEntry entry in CreateWorld.Commands)
            {
                if (entry.Name == "Factions" && !Server.Factions.Settings.Enabled)
                {
                    continue;
                }

                bool created = CreateWorldData.CreateTable.ContainsKey(entry.CheckID) && CreateWorldData.CreateTable[entry.CheckID];

                AddLabel(20, y + 1, created ? 200 : 338, String.Format("{0} {1}", entry.Name, created ? "[created]" : "[not created]"));
                AddCheck(210, y - 2, 210, 211, m_Type == CreateWorld.GumpType.Create ? !created : created, entry.CheckID);

                y += 25;
            }

            y = 25 + (items * 25);

            AddButton(60, y + 15, 247, 249, 1, GumpButtonType.Reply, 0);
            AddButton(130, y + 15, 241, 243, 0, GumpButtonType.Reply, 0);
        }
Example #2
0
        public CreateWorldGump(CommandEventArgs e, CreateWorld.GumpType type)
            : base(50, 50)
        {
            m_Type = type;
            this.m_CommandEventArgs = e;
            this.Closable           = true;
            this.Dragable           = true;

            this.AddPage(1);

            int items = CreateWorld.Commands.Count;

            if (!Server.Factions.Settings.Enabled)
            {
                items--;
            }

            this.AddBackground(0, 0, 240, 75 + items * 25, 5054);
            switch (m_Type)
            {
            case CreateWorld.GumpType.Create:
                this.AddLabel(40, 2, 200, "CREATE WORLD GUMP");
                break;

            case CreateWorld.GumpType.Delete:
                this.AddLabel(40, 2, 200, "DELETE WORLD GUMP");
                break;

            case CreateWorld.GumpType.Recreate:
                this.AddLabel(40, 2, 200, "RECREATE WORLD GUMP");
                break;
            }
            this.AddImageTiled(10, 20, 220, 10 + items * 25, 3004);
            int y = 25;

            foreach (CreateWorld.CommandEntry entry in CreateWorld.Commands)
            {
                if (entry.Name == "Factions" && !Server.Factions.Settings.Enabled)
                {
                    continue;
                }

                this.AddLabel(20, y + 1, 200, entry.Name);
                this.AddCheck(180, y - 2, 210, 211, true, entry.checkId);
                y += 25;
            }

            y = 25 + (items * 25);

            this.AddButton(60, y + 15, 247, 249, 1, GumpButtonType.Reply, 0);
            this.AddButton(130, y + 15, 241, 243, 0, GumpButtonType.Reply, 0);
        }
Example #3
0
        public CreateWorldGump(CommandEventArgs e, CreateWorld.GumpType type)
            : base(50, 50)
        {
            m_Type             = type;
            m_CommandEventArgs = e;
            Closable           = true;
            Dragable           = true;

            AddPage(1);

            int items = CreateWorld.Commands.Count;

            AddBackground(0, 0, 280, 75 + items * 25, 5054);
            switch (m_Type)
            {
            case CreateWorld.GumpType.Create:
                AddLabel(40, 2, 200, "CREATE WORLD GUMP");
                break;

            case CreateWorld.GumpType.Delete:
                AddLabel(40, 2, 200, "DELETE WORLD GUMP");
                break;

            case CreateWorld.GumpType.Recreate:
                AddLabel(40, 2, 200, "RECREATE WORLD GUMP");
                break;
            }

            AddImageTiled(10, 20, 220, 10 + items * 25, 3004);
            int y = 25;

            for (var index = 0; index < CreateWorld.Commands.Count; index++)
            {
                CreateWorld.CommandEntry entry = CreateWorld.Commands[index];

                bool created = CreateWorldData.CreateTable.ContainsKey(entry.CheckID) && CreateWorldData.CreateTable[entry.CheckID];

                AddLabel(20, y + 1, created ? 200 : 338, $"{entry.Name} {(created ? "[created]" : "[not created]")}");
                AddCheck(210, y - 2, 210, 211, m_Type == CreateWorld.GumpType.Create ? !created : created, entry.CheckID);

                y += 25;
            }

            y = 25 + (items * 25);

            AddButton(60, y + 15, 247, 249, 1, GumpButtonType.Reply, 0);
            AddButton(130, y + 15, 241, 243, 0, GumpButtonType.Reply, 0);
        }
Example #4
0
 public NewCreateWorldGump(PlayerMobile pm, CreateWorld.GumpType type)
     : base(pm, 50, 50)
 {
     GumpType = type;
 }
Example #5
0
        public CreateWorldGump(CommandEventArgs e, CreateWorld.GumpType type)
            : base(50,50)
        {
			m_Type = type;
            this.m_CommandEventArgs = e;
            this.Closable = true;
            this.Dragable = true;

            this.AddPage(1);

			int items = CreateWorld.Commands.Count;
			this.AddBackground(0, 0, 240, 75 + items * 25, 5054);
			switch (m_Type)
			{
				case CreateWorld.GumpType.Create:
					this.AddLabel(40, 2, 200, "CREATE WORLD GUMP");
					break;
				case CreateWorld.GumpType.Delete:
					this.AddLabel(40, 2, 200, "DELETE WORLD GUMP");
					break;
				case CreateWorld.GumpType.Recreate:
					this.AddLabel(40, 2, 200, "RECREATE WORLD GUMP");
					break;
			}
			this.AddImageTiled(10, 20, 220, 10 + items * 25, 3004);
			int y = 25;
			foreach(CreateWorld.CommandEntry entry in CreateWorld.Commands)
			{
				this.AddLabel(20, y + 1, 200, entry.Name);
				this.AddCheck(180, y - 2, 210, 211, true, entry.checkId);
				y += 25;
			}
			this.AddButton(60, y + 15, 247, 249, 1, GumpButtonType.Reply, 0);
			this.AddButton(130, y + 15, 241, 243, 0, GumpButtonType.Reply, 0);
        }