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");
                }
            }
        }
 public static void AddMessage(SMotDStruct mds)
 {
     m_Messages.Add(mds);
     OnNewMessage();
 }
            public ModSMoTDGump(SMotDStruct mds, bool existing)
                : base()
            {
                m_Mds = mds;
                m_Existing = existing;

                SMotD.GenerateRegulars(this, mds, -1);

                AddButton(30, 400, 4011, 4012, 1, GumpButtonType.Reply, 0);
                AddLabel(65, 400, 0, existing? "Submit Message":"Add Message");
                AddButton(260, 400, 4017, 4018, 0, GumpButtonType.Reply, 0);
                AddLabel(295, 400, 0, "Cancel");

                AddBackground(400, 30, 375, 400, 9380);

                AddLabel(445, 60, 0, "Change title:");
                AddBackground(445, 85, 250, 20, 9300);
                AddTextEntry(450, 85, 230, 20, 0, 2, "");
                AddButton(700, 85, 4014, 4015, 2, GumpButtonType.Reply, 0);

                AddImageTiled(450, 111, 277, 11, 50);

                AddLabel(445, 125, 0, "Add text to body:");
                AddBackground(445, 150, 250, 140, 9300);
                AddTextEntry(450, 155, 230, 130, 0, 3, "");
                AddButton(700, 270, 4014, 4015, 3, GumpButtonType.Reply, 0);

                AddLabel(445, 300, 0, "Remove characters:");
                AddBackground(600, 300, 100, 22, 9300);
                AddTextEntry(605, 300, 90, 15, 0, 4, "");
                AddButton(700, 300, 4014, 4015, 4, GumpButtonType.Reply, 0);

                AddImageTiled(448, 330, 277, 11, 50);

                AddLabel(445, 350, 0, "Add Link:");
                AddBackground(520, 345, 180, 25, 9300);
                AddTextEntry(525, 350, 170, 15, 0, 5, "");
                AddButton(700, 350, 4014, 4015, 5, GumpButtonType.Reply, 0);
                AddLabel(590, 370, 0, "Remove last link");
                AddButton(700, 370, 4014, 4015, 6, GumpButtonType.Reply, 0);
            }