Esempio n. 1
0
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            if (IsInitialized && _text == null)
            {
                ResizePic resize;

                _text = new HtmlGump(this, 0, 10, 10, 200, 200, 0, 0, _msg);
                int width = _text.Width + 20;
                AddControl(resize = new ResizePic(this, 0, 0, 0, 9200, width, _text.Height + 45));
                AddControl(_text);
                // Add buttons
                switch (_type)
                {
                    case MsgBoxTypes.OkOnly:
                        AddControl(new Button(this, 0, (_text.Width + 20) / 2 - 23, _text.Height + 15, 2074, 2075, ButtonTypes.Activate, 0, 0));
                        ((Button)LastControl).GumpOverID = 2076;
                        break;
                    case MsgBoxTypes.OkCancel:
                        AddControl(new Button(this, 0, (width / 2) - 46 - 10, _text.Height + 15, 0x817, 0x818, ButtonTypes.Activate, 0, 1));
                        ((Button)LastControl).GumpOverID = 0x819;
                        AddControl(new Button(this, 0, (width / 2) + 10, _text.Height + 15, 2074, 2075, ButtonTypes.Activate, 0, 0));
                        ((Button)LastControl).GumpOverID = 2076;
                        break;
                }

                base.Update(gameTime);
                Center();
            }
            base.Update(gameTime);
        }
Esempio n. 2
0
        public SkillsGump()
            : base(0, 0)
        {
            AddControl(_scroll = new ExpandableScroll(this, 0, 0, 0, 200));
            _scroll.TitleGumpID = 0x834;
            _scroll.MakeDragger(this);
            _scroll.MakeCloseTarget(this);
            IsMovable = true;

            AddControl(_list = new HtmlGump(this, 0, 10, 20, 180, 100, 0, 1, ""));
        }
Esempio n. 3
0
        public ContainerGump(Entity containerItem, int gumpID)
            : base(containerItem.Serial, 0)
        {
            _data = Data.ContainerData.GetData(gumpID);
            _item = (Container)containerItem;
            IsMovable = true;

            AddControl(new GumpPicContainer(this, 0, 0, 0, _data.GumpID, 0, _item));
            LastControl.MakeDragger(this);
            LastControl.MakeCloseTarget(this);

            _tickerText = (HtmlGump)AddControl(new HtmlGump(this, 0, 50, 50, 0, 0, 0, 0, string.Empty));
        }
Esempio n. 4
0
 public DebugGump()
     : base(0, 0)
 {
     int width = 200;
     // minimized view
     IsMovable = true;
     AddControl(new Gumplings.ResizePic(this, 2, 0, 0, 0x2486, width, 16));
     AddControl(new Gumplings.Button(this, 2, width - 18, 0, 2117, 2118, 0, 1, 0));
     // maximized view
     AddControl(new Gumplings.ResizePic(this, 1, 0, 0, 0x2486, width, 256));
     AddControl(new Gumplings.Button(this, 1, width - 18, 0, 2117, 2118, 0, 2, 0));
     AddControl(new Gumplings.TextLabel(this, 1, 4, 2, 0, "Debug Gump"));
     // AddGumpling(new Gumplings.Button(this, 2, 2, 18, 2117, 2118, ButtonTypes.Activate, 0, 0));
     _html = (Gumplings.HtmlGump)AddControl(new Gumplings.HtmlGump(this, 1, 4, 16, width - 8, 230, 0, 0, ""));
 }
Esempio n. 5
0
 public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
 {
     if (ClientVars.Characters.UpdateValue != _charListUpdate)
     {
         int entryIndex = 0;
         _characterNames = new HtmlGump[ClientVars.Characters.Length];
         foreach (CharacterListEntry e in ClientVars.Characters.List)
         {
             if (e.Name != string.Empty)
             {
                 _characterNames[entryIndex] = new HtmlGump(this, 1, 228, 154 + 40 * entryIndex, 272, 22, 0, 0, formatHTMLCharName(entryIndex, e.Name, (_charSelected == entryIndex ? 431 : 1278)));
                 AddControl(new ResizePic(this, _characterNames[entryIndex]));
                 AddControl(_characterNames[entryIndex]);
             }
             entryIndex++;
         }
         _charListUpdate = ClientVars.Characters.UpdateValue;
     }
     base.Update(gameTime);
 }