Example #1
0
        public static void SendGump(Mobile m, string message)
        {
            Gump g = new Gump(10, 10);
            int  xo = (640 - 340) / 2, yo = (480 - 180) / 2;

            g.Closable = false;

            g.AddPage(0);
            g.AddPage(1);
            g.AddBackground(0, 0, 92, 75, 0xA3C);
            g.AddImageTiled(5, 7, 82, 61, 0xA40);
            g.AddAlphaRegion(5, 7, 82, 61);
            g.AddImageTiled(9, 11, 21, 53, 0xBBC);
            g.AddButton(10, 12, 0x7D2, 0x7D2, 2, GumpButtonType.Page, 2);
            g.AddHtmlLocalized(34, 28, 65, 24, 3001002, 0xFFFFFF, false, false); // Message
            g.AddPage(2);
            g.AddBackground(xo + 0, yo + 0, 340, 180, 5054);
            g.AddImageTiled(xo + 10, yo + 10, 340 - 20, 20, 2624);
            g.AddAlphaRegion(xo + 10, yo + 10, 340 - 20, 20);
            g.AddHtmlLocalized(xo + 10, yo + 10, 340 - 20, 20, 1074862, 0xffffff, false, false);
            g.AddImageTiled(xo + 10, yo + 40, 340 - 20, 180 - 80, 2624);
            g.AddAlphaRegion(xo + 10, yo + 40, 340 - 20, 180 - 80);
            g.AddHtml(xo + 10, yo + 40, 340 - 20, 180 - 80, String.Format("<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", 0xffffff, message), false, true);
            g.AddImageTiled(xo + 10, yo + 180 - 30, 340 - 20, 20, 2624);
            g.AddAlphaRegion(xo + 10, yo + 180 - 30, 340 - 20, 20);
            g.AddButton(xo + 10, yo + 180 - 30, 4005, 4007, 1, GumpButtonType.Reply, 0);
            g.AddHtmlLocalized(xo + 40, yo + 180 - 30, 120, 20, 1011036, 32767, false, false); // OKAY
            m.SendGump(g);
        }
Example #2
0
        internal void BaseSkinByType(Gump g)
        {
            if (relplug == null)
            {
                SkillSettings.DoTell("Base Type is invalid. Cannot skin.");
            }
            g.AddPage(0);
            string switchby = relplug.getGumpType();

            if (switchby == "Control")
            {
                //this.X = sk.GetCoord("Control", "X", sk ); this.Y = sk.SelectionY;
                g.X = 0; g.Y = 0;
                if (!Skin.WindowInfo.ContainsKey("Control"))
                {
                    SkillSettings.DoTell("No key for Control gump skin."); return;
                }
                WindowInfo inf = Skin.WindowInfo["Control"];
                g.X = inf.X; g.Y = inf.Y;
                //this.AddBackground(sk.GetCoord("Control", "X", sk ), sk.SelectionY, sk.GetCoord("Control", "W", sk ), sk.GetCoord("Control", "H", sk ), sk.SelectBGID);
                g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
                g.AddImageTiled(Skin.BarSHX, Skin.BarSHY, Skin.BarSHW, Skin.BarSHH, Skin.SelectLineH);
                g.AddHtml(Skin.TMSSX, Skin.TMSSY, 140, 20, "<basefont size=5 face=1 color=#CC0000><Center>TMSS - //4// -</center></basefont>", false, false);
                //<basefont size=5 face=1 color=#CC0000><Center>TM Skill & Stat System v3.0</center></basefont>
            }
            else if (switchby == "Master")
            {
                g.X = 0; g.Y = 0;
                if (!Skin.WindowInfo.ContainsKey("Master"))
                {
                    SkillSettings.DoTell("No key for Master gump skin."); return;
                }
                WindowInfo inf = Skin.WindowInfo["Master"];
                //this.AddBackground(sk.MasterX, sk.MasterY, sk.MasterW, sk.MasterH, sk.MasterBGID);
                g.X = inf.X; g.Y = inf.Y;
                g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
                g.AddImageTiled(Skin.BarMHX, Skin.BarMHY, Skin.BarMHW, Skin.BarMHH, Skin.MasterLineH);
                g.AddImageTiled(Skin.BarMVX, Skin.BarMVY, Skin.BarMVW, Skin.BarMVH, Skin.MasterLineV);
                g.AddItem(Skin.IconMX, Skin.IconMY, Skin.IconMID, Skin.IconMColor);
            }
            else if (switchby == "Underbar")
            {
                g.X = 0; g.Y = 0;
                if (!Skin.WindowInfo.ContainsKey("Underbar"))
                {
                    SkillSettings.DoTell("No key for Underbar gump skin."); return;
                }
                WindowInfo inf = Skin.WindowInfo["Underbar"];
                g.X = inf.X; g.Y = inf.Y;
                g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
                //this.AddBackground(sk.sk.GetCoord("Underbar", "X", );, sk.sk.GetCoord("Underbar", "Y", );, sk.HelpW, sk.HelpH, sk.HelpBGID);
            }
            else
            {
                SkillSettings.DoTell("Unknown Gump Type. Cannot apply base skin.");
            }
        }