Пример #1
0
        private void CompileTitleLayout(SuperGumpLayout layout, Title title)
        {
            layout.Add("label/body/title/grantmessage", () => AddLabel(70, 110, 1457, "This scroll grants the title: "));
            layout.Add("label/body/title/grant", () => AddLabel(110, 145, 1461, title.ToString(User.Female)));

            layout.Add("image/body/title/Hbar", () => AddImageTiled(100, 160, 120, 2, 2620));

            layout.Add("label/body/title/raritymessage", () => AddLabel(25, 185, 1457, "Title Rarity: "));
            layout.Add("label/body/title/rarity", () => AddLabel(105, 185, title.GetRarityHue(), title.Rarity.ToString()));

            layout.Add("label/body/title/owned", () => AddLabel(25, 205, 1457, "People who have this title: "));
            layout.Add("label/body/title/ownednumber", () => AddLabel(193, 205, 1461, title.GetOwnerCount().ToString("#,0")));
        }
Пример #2
0
        public override void OnSingleClick(Mobile m)
        {
            if (Title == null)
            {
                base.OnSingleClick(m);
                return;
            }

            LabelToExpansion(m);

            LabelTo(m, this.ResolveName(m), Title.GetRarityHue());
            LabelTo(m, Title.GetRarityHue(), 1049644, "Title: " + Title.ToString(m.Female));

            if (BoundToMobile != null)
            {
                LabelTo(m, "Bound to: " + BoundToMobile.Name, Title.GetRarityHue());
            }
        }
Пример #3
0
		private void CompileTitleLayout(SuperGumpLayout layout, Title title)
		{
			layout.Add("label/body/title/grantmessage", () => AddLabel(70, 110, 1457, "This scroll grants the title: "));
			layout.Add("label/body/title/grant", () => AddLabel(110, 145, 1461, title.ToString(User.Female)));

			layout.Add("image/body/title/Hbar", () => AddImageTiled(100, 160, 120, 2, 2620));

			layout.Add("label/body/title/raritymessage", () => AddLabel(25, 185, 1457, "Title Rarity: "));
			layout.Add("label/body/title/rarity", () => AddLabel(105, 185, title.GetRarityHue(), title.Rarity.ToString()));

			layout.Add("label/body/title/owned", () => AddLabel(25, 205, 1457, "People who have this title: "));
			layout.Add("label/body/title/ownednumber", () => AddLabel(193, 205, 1461, title.GetOwnerCount().ToString("#,0")));
		}
Пример #4
0
        private void CompileTitleLayout(SuperGumpLayout layout, int index, int pIndex, int xOffset, int yOffset, Title title)
        {
            layout.AddReplace(
                "button/list/select/" + index, () => AddButton(xOffset, yOffset + 2, 2224, 2224, btn => SelectEntry(btn, title)));

            layout.AddReplace(
                "label/list/entry/" + index,
                () => AddLabel(xOffset + 20, yOffset - 3, GetLabelHue(index, pIndex, title), title.ToString(User.Female)));

            if (User.AccessLevel >= AccessLevel.Administrator)
            {
                layout.Add(
                    "button/list/purge/" + index, () => AddButton(xOffset + 125, yOffset, 22150, 22151, btn => PurgeTitle(title)));
            }
        }
Пример #5
0
        private void CompileTitleViewLayout(SuperGumpLayout layout)
        {
            layout.Add("label/chest/title/title", () => AddLabel(105, 120, 44, "Titles"));
            layout.Add("label/chest/title/selected/title", () => AddLabel(215, 120, 44, "Current Title: "));
            layout.Add(
                "label/chest/title/selected/value",
                () =>
            {
                TitleHue selectedHue = _TitleProfile.SelectedHue;
                Title selectedTitle  = _TitleProfile.SelectedTitle;
                Mobile owner         = _TitleProfile.Owner ?? User;

                int hue      = selectedHue != null ? selectedHue.Hue - 1 : CustomTitles.CMOptions.DefaultTitleHue;
                string title = selectedTitle != null ? selectedTitle.ToString(owner.Female) : String.Empty;

                if (!String.IsNullOrWhiteSpace(title))
                {
                    AddLabel(305, 120, hue, title);
                }
            });

            layout.Add(
                "button/chest/title/clear/",
                () => AddButton(
                    405,
                    120,
                    22150,
                    22151,
                    btn =>
            {
                _TitleProfile.SelectedTitle = null;
                Refresh(true);
            }));

            layout.Add("label/chest/title/switch", () => AddLabel(450, 115, 44, "To Hues: "));
            layout.Add(
                "button/chest/title/switch",
                () => AddButton(
                    515,
                    115,
                    4006,
                    4005,
                    b =>
            {
                _View = ViewMode.Hue;
                Refresh(true);
            }));

            layout.Add("image/body/title/Hbar", () => AddImageTiled(101, 140, 452, 1, 0x2458));

            CompileRarityLayout(layout);

            if (User.AccessLevel < CustomTitles.Access)
            {
                return;
            }

            layout.Add("image/body/title/Hbaradmintop", () => AddImageTiled(78, 325, 500, 1, 9304));
            //layout.Add("label/body/title/create", () => AddLabel(105, 330, 44, "Create New Title"));
            //layout.Add("image/body/title/Hbarnewunderline", () => AddImageTiled(107, 347, 100, 1, 9304));

            layout.Add("label/body/title/male", () => AddLabel(105, 330, 100, "Male Title"));
            layout.Add("background/body/title/male", () => AddBackground(105, 355, 125, 25, 9350));
            layout.Add(
                "textentry/body/title/male",
                () => AddTextEntryLimited(
                    108,
                    360,
                    125,
                    25,
                    100,
                    _AddTitleMale,
                    15,
                    (b, t) =>
            {
                if (!String.IsNullOrWhiteSpace(t))
                {
                    _AddTitleMale = t;
                }
            }));

            layout.Add("label/body/title/female", () => AddLabel(235, 330, 100, "Female Title"));
            layout.Add("background/body/female", () => AddBackground(235, 355, 125, 25, 9350));
            layout.Add(
                "textentry/body/title/female",
                () => AddTextEntryLimited(
                    238,
                    360,
                    125,
                    25,
                    100,
                    _AddTitleFemale,
                    15,
                    (b, t) =>
            {
                if (!String.IsNullOrWhiteSpace(t))
                {
                    _AddTitleFemale = t;
                }
            }));

            layout.Add("background/body/title/display", () => AddBackground(365, 330, 125, 25, 9350));
            layout.Add(
                "textentry/body/title/display",
                () => AddEnumSelect(
                    365,
                    330,
                    4005,
                    4007,
                    35,
                    2,
                    25,
                    90,
                    TextHue,
                    _AddDisplay,
                    d =>
            {
                _AddDisplay = d;
                Refresh(true);
            }));

            layout.Add("background/body/title/rarity", () => AddBackground(365, 355, 125, 25, 9350));
            layout.Add(
                "menu/body/title/rarity",
                () => AddEnumSelect(
                    365,
                    355,
                    4005,
                    4007,
                    35,
                    2,
                    25,
                    90,
                    _AddRarity.AsHue(),
                    _AddRarity,
                    r =>
            {
                _AddRarity = r;
                Refresh(true);
            }));

            layout.Add("button/body/title/help", () => AddButton(495, 360, 22153, 22154, b => DisplayHelp()));
            layout.Add("button/body/title/accept", () => AddButton(525, 357, 4024, 4025, b => AddTitle()));
        }