Exemplo n.º 1
0
 public LoginGump()
     : base(0, 0)
 {
     int hue = 1132; // dark brown
     m_renderFullScreen = false;
     // backdrop
     AddControl(new GumpPic(this, 0, 0, 0, 9001,0));
     // quit button
     AddControl(new Button(this, 0, 554, 2, 5513, 5515, ButtonTypes.Activate, 0, (int)LoginGumpButtons.QuitButton));
     ((Button)LastControl).GumpOverID = 5514;
     // Log in to Ultima Online
     AddControl(new TextLabelAscii(this, 0, 254, 305, hue, 2, UltimaData.StringData.Entry(3000038)));
     // Account Name
     AddControl(new TextLabelAscii(this, 0, 181, 346, hue, 2, UltimaData.StringData.Entry(3000099)));
     // Password
     AddControl(new TextLabelAscii(this, 0, 181, 386, hue, 2, UltimaData.StringData.Entry(3000103)));
     // name field
     TextEntry g1 = new TextEntry(this, 0, 332, 346, 200, 20, 0, (int)LoginGumpTextFields.AccountName, 32, "Admin");
     g1.HtmlTag = "<basefont color=#000000><big>";
     AddControl(new ResizePic(this, g1));
     AddControl(g1);
     // password field
     TextEntry g2 = new TextEntry(this, 0, 332, 386, 200, 20, 0, (int)LoginGumpTextFields.Password, 32, "Admin");
     g2.IsPasswordField = true;
     g2.HtmlTag = "<basefont color=#000000><big>";
     AddControl(new ResizePic(this, g2));
     AddControl(g2);
     // login button
     AddControl(new Button(this, 0, 610, 435, 5540, 5542, ButtonTypes.Activate, 0, (int)LoginGumpButtons.LoginButton));
     ((Button)LastControl).GumpOverID = 5541;
     // Version information
     AddControl(new TextLabelAscii(this, 0, 183, 421, hue, 9, Utility.VersionString));
 }
Exemplo n.º 2
0
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            if (InputState == null)
            {
                InputState = new TextEntry(this, 0, 1, UserInterface.Height - UniText.FontHeight(0) + 4, 400, UniText.FontHeight(0), 0, 0, 64, string.Empty);
                InputState.LegacyCarat = true;
                AddControl(InputState);
            }

            int y = InputState.Y - 48;
            for (int i = 0; i < m_textEntries.Count; i++)
            {
                m_textEntries[i].Update(gameTime);
                if (m_textEntries[i].IsExpired)
                {
                    m_textEntries[i].Dispose();
                    m_textEntries.RemoveAt(i);
                    i--;
                }
            }

            base.Update(gameTime);
        }
        public CreateCharAppearanceGump()
            : base(0, 0)
        {
            m_renderFullScreen = false;
            // backdrop
            AddControl(new GumpPicTiled(this, 0, 0, 0, 640, 480, 9274));
            AddControl(new GumpPic(this, 0, 0, 0, 5500, 0));
            // character name
            AddControl(new GumpPic(this, 0, 280, 53, 1801, 0));
            m_Name = new TextEntry(this, 0, 238, 70, 234, 20, 0, 0, 29, string.Empty);
            AddControl(new ResizePic(this, m_Name));
            AddControl(m_Name);
            // character window
            AddControl(new GumpPic(this, 0, 238, 98, 1800, 0));
            // paperdoll
            m_paperdoll = new PaperdollLargeUninteractable(this, 0, 237, 97);
            m_paperdoll.IsCharacterCreation = true;
            AddControl(m_paperdoll);

            // left option window
            AddControl(new ResizePic(this, 0, 82, 125, 3600, 151, 310));
            // this is the place where you would put the race selector.
            // if you do add it, move everything else in this left window down by 45 pixels
            // gender
            AddControl(new TextLabelAscii(this, 1, 100, 141, 2037, 9, UltimaData.StringData.Entry(3000120)));
            m_Gender = new DropDownList(this, 0, 97, 154, 122, 0, 2, new string[] { UltimaData.StringData.Entry(3000118), UltimaData.StringData.Entry(3000119) }, false);
            AddControl(m_Gender);
            // hair (male)
            AddControl(new TextLabelAscii(this, 1, 100, 186, 2037, 9, UltimaData.StringData.Entry(3000121)));
            m_HairMale = new DropDownList(this, 1, 97, 199, 122, 0, 6, UltimaData.HairStyles.MaleHairNames, false);
            AddControl(m_HairMale);
            // facial hair (male)
            AddControl(new TextLabelAscii(this, 1, 100, 231, 2037, 9, UltimaData.StringData.Entry(3000122)));
            m_FacialHairMale = new DropDownList(this, 1, 97, 244, 122, 0, 6, UltimaData.HairStyles.FacialHair, false);
            AddControl(m_FacialHairMale);
            // hair (female)
            AddControl(new TextLabelAscii(this, 2, 100, 186, 2037, 9, UltimaData.StringData.Entry(3000121)));
            m_HairFemale = new DropDownList(this, 2, 97, 199, 122, 0, 6, UltimaData.HairStyles.FemaleHairNames, false);
            AddControl(m_HairFemale);

            // right option window
            AddControl(new ResizePic(this, 0, 475, 125, 3600, 151, 310));
            // skin tone
            AddControl(new TextLabelAscii(this, 0, 489, 141, 2037, 9, UltimaData.StringData.Entry(3000183)));
            m_SkinHue = new ColorPicker(this, 0, new Rectangle(490, 154, 120, 24), new Rectangle(490, 140, 120, 280), 7, 8, UltimaData.HueData.SkinTones);
            AddControl(m_SkinHue);
            // hair color
            AddControl(new TextLabelAscii(this, 0, 489, 186, 2037, 9, UltimaData.StringData.Entry(3000184)));
            m_HairHue = new ColorPicker(this, 0, new Rectangle(490, 199, 120, 24), new Rectangle(490, 140, 120, 280), 8, 6, UltimaData.HueData.HairTones);
            AddControl(m_HairHue);
            // facial hair color (male)
            AddControl(new TextLabelAscii(this, 1, 489, 231, 2037, 9, UltimaData.StringData.Entry(3000185)));
            m_FacialHairHue = new ColorPicker(this, 1, new Rectangle(490, 244, 120, 24), new Rectangle(490, 140, 120, 280), 8, 6, UltimaData.HueData.HairTones);
            AddControl(m_FacialHairHue);

            // back button
            AddControl(new Button(this, 1, 586, 435, 5537, 5539, ButtonTypes.Activate, 0, (int)Buttons.BackButton));
            ((Button)LastControl).GumpOverID = 5538;
            // forward button
            AddControl(new Button(this, 1, 610, 435, 5540, 5542, ButtonTypes.Activate, 0, (int)Buttons.ForwardButton));
            ((Button)LastControl).GumpOverID = 5541;
            // quit button
            AddControl(new Button(this, 0, 554, 2, 5513, 5515, ButtonTypes.Activate, 0, (int)Buttons.QuitButton));
            ((Button)LastControl).GumpOverID = 5514;
        }