Example #1
0
            public MotDGump(Mobile from, int mID) : base(50, 50)
            {
                m_Mobile = from;
                m_ID     = mID;

                if (m_ID < 0 || m_ID >= MotD.Messages.Count)
                {
                    return;
                }

                MotDStruct mds = (MotDStruct)Messages[m_ID];

                MotD.GenerateRegulars(this, mds, mID);

                if (from.AccessLevel < AccessLevel.Administrator)
                {
                    AddLabel(30, 395, 0, "Greetings,");
                    AddLabel(90, 420, 0, "The Defiance UOR staff");
                }

                else
                {
                    AddButton(30, 400, 4011, 4012, 3, GumpButtonType.Reply, 0);
                    AddLabel(65, 400, 0, "New Message");
                    AddButton(165, 400, 4026, 4027, 4, GumpButtonType.Reply, 0);
                    AddLabel(200, 400, 0, "Edit");
                    AddButton(260, 400, 4017, 4018, 5, GumpButtonType.Reply, 0);
                    AddLabel(295, 400, 0, "Remove");
                }
            }
Example #2
0
            public ModMoTDGump(MotDStruct mds, bool existing)
                : base()
            {
                m_Mds      = mds;
                m_Existing = existing;

                MotD.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);
            }