示例#1
0
        public static void GenerateRegulars(AdvGump gump, MotDStruct mds, int id)
        {
            gump.Closable   = true;
            gump.Disposable = true;
            gump.Dragable   = true;
            gump.Resizable  = false;

            gump.AddPage(0);
            gump.AddBackground(0, 0, 400, 476, 9380);
            gump.AddImageTiled(25, 60, 350, 10, 50);
            gump.AddImageTiled(75, 115, 250, 10, 50);
            gump.AddImageTiled(25, 300, 350, 10, 50);
            gump.AddImageTiled(25, 345, 350, 10, 50);
            gump.AddImageTiled(25, 383, 350, 10, 50);
            gump.AddBackground(30, 130, 340, 165, 9300);
            gump.AddHtml(0, 40, 400, 18, gump.Center(m_GumpName), false, false);
            gump.AddImage(343, 411, 9004);

            gump.AddPage(1);
            gump.AddHtml(0, 95, 400, 18, gump.Center(mds.Subject), false, false);
            gump.AddHtml(35, 135, 330, 155, gump.Colorize(mds.Body, "333333"), false, true);

            if (mds.Links.Count > 0)
            {
                gump.AddLabel(35, 320, 0, "Links:");
                for (int i = 0; i < mds.Links.Count; i++)
                {
                    if (gump is MotDGump)
                    {
                        gump.AddButton(80 + i * 35, 320, 4011, 4011, 900 + i, GumpButtonType.Reply, 0);
                    }
                    else
                    {
                        gump.AddImage(80 + i * 35, 320, 4011);
                    }
                }
            }

            else
            {
                gump.AddHtml(0, 320, 400, 18, gump.Center("Using the [MotD command you can review all messages"), false, false);
            }

            if (id != -1)
            {
                if (id < (MotD.LastMessage))
                {
                    gump.AddButton(32, 360, 9770, 9772, 1, GumpButtonType.Reply, 0);
                    gump.AddLabel(60, 360, 0, "Next Message");
                }

                if (id > 0)
                {
                    gump.AddButton(349, 360, 9771, 9773, 2, GumpButtonType.Reply, 0);
                    gump.AddLabel(230, 360, 0, "Previous Message");
                }
            }
        }
        public static void GenerateRegulars(AdvGump gump, SMotDStruct mds, int id)
        {
            gump.Closable = true;
            gump.Disposable = true;
            gump.Dragable = true;
            gump.Resizable = false;

            gump.AddPage(0);
            gump.AddBackground(0, 0, 400, 476, 9380);
            gump.AddImageTiled(25, 60, 350, 10, 50);
            gump.AddImageTiled(75, 115, 250, 10, 50);
            gump.AddImageTiled(25, 300, 350, 10, 50);
            gump.AddImageTiled(25, 345, 350, 10, 50);
            gump.AddImageTiled(25, 383, 350, 10, 50);
            gump.AddBackground(30, 130, 340, 165, 9300);
            gump.AddHtml(0, 40, 400, 18, gump.Center(m_GumpName), false, false);
            gump.AddImage(343, 411, 9004);

            gump.AddPage(1);
            gump.AddHtml(0, 95, 400, 18, gump.Center(mds.Subject), false, false);
            gump.AddHtml(35, 135, 330, 155, gump.Colorize(mds.Body, "333333"), false, true);

            if (mds.Links.Count > 0)
            {
                gump.AddLabel(35, 320, 0, "Links:");
                for (int i = 0; i < mds.Links.Count; i++)
                {
                    if (gump is SMotDGump)
                        gump.AddButton(80 + i * 35, 320, 4011, 4011, 900 + i, GumpButtonType.Reply, 0);
                    else
                        gump.AddImage(80 + i * 35, 320, 4011);
                }
            }

            else
                gump.AddHtml(0, 320, 400, 18, gump.Center("Using the [SMotD command you can review all messages"), false, false);

            if (id != -1)
            {
                if (id < (SMotD.LastMessage))
                {
                    gump.AddButton(32, 360, 9770, 9772, 1, GumpButtonType.Reply, 0);
                    gump.AddLabel(60, 360, 0, "Next Message");
                }

                if (id > 0)
                {
                    gump.AddButton(349, 360, 9771, 9773, 2, GumpButtonType.Reply, 0);
                    gump.AddLabel(230, 360, 0, "Previous Message");
                }
            }
        }