public override void Update(Microsoft.Xna.Framework.GameTime gameTime) { if (IsInitialized && m_text == null) { ResizePic resize; m_text = new HtmlGump(this, 0, 10, 10, 200, 200, 0, 0, m_msg); int width = m_text.Width + 20; AddControl(resize = new ResizePic(this, 0, 0, 0, 9200, width, m_text.Height + 45)); AddControl(m_text); // Add buttons switch (m_type) { case MsgBoxTypes.OkOnly: AddControl(new Button(this, 0, (m_text.Width + 20) / 2 - 23, m_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, m_text.Height + 15, 0x817, 0x818, ButtonTypes.Activate, 0, 1)); ((Button)LastControl).GumpOverID = 0x819; AddControl(new Button(this, 0, (width / 2) + 10, m_text.Height + 15, 2074, 2075, ButtonTypes.Activate, 0, 0)); ((Button)LastControl).GumpOverID = 2076; break; } base.Update(gameTime); Center(); } base.Update(gameTime); }
public SkillsGump() : base(0, 0) { AddControl(m_scroll = new ExpandableScroll(this, 0, 0, 0, 200)); m_scroll.TitleGumpID = 0x834; m_scroll.MakeDragger(this); m_scroll.MakeCloseTarget(this); IsMovable = true; AddControl(m_list = new HtmlGump(this, 0, 10, 20, 180, 100, 0, 1, "")); }
public ContainerGump(BaseEntity containerItem, int gumpID) : base(containerItem.Serial, 0) { m_data = UltimaData.ContainerData.GetData(gumpID); m_item = (Container)containerItem; IsMovable = true; AddControl(new GumpPicContainer(this, 0, 0, 0, m_data.GumpID, 0, m_item)); LastControl.MakeDragger(this); LastControl.MakeCloseTarget(this); m_tickerText = (HtmlGump)AddControl(new HtmlGump(this, 0, 50, 50, 0, 0, 0, 0, string.Empty)); }
public DebugGump() : base(0, 0) { int width = 200; // minimized view IsMovable = true; AddControl(new Controls.ResizePic(this, 2, 0, 0, 0x2486, width, 16)); AddControl(new Controls.Button(this, 2, width - 18, 0, 2117, 2118, 0, 1, 0)); // maximized view AddControl(new Controls.ResizePic(this, 1, 0, 0, 0x2486, width, 256)); AddControl(new Controls.Button(this, 1, width - 18, 0, 2117, 2118, 0, 2, 0)); AddControl(new Controls.TextLabel(this, 1, 4, 2, 0, "Debug Gump")); // AddGumpling(new Controls.Button(this, 2, 2, 18, 2117, 2118, ButtonTypes.Activate, 0, 0)); m_html = (Controls.HtmlGump)AddControl(new Controls.HtmlGump(this, 1, 4, 16, width - 8, 230, 0, 0, "")); }
public override void Update(Microsoft.Xna.Framework.GameTime gameTime) { if (UltimaVars.Characters.UpdateValue != m_charListUpdate) { int entryIndex = 0; m_characterNames = new HtmlGump[UltimaVars.Characters.Length]; foreach (CharacterListEntry e in UltimaVars.Characters.List) { if (e.Name != string.Empty) { m_characterNames[entryIndex] = new HtmlGump(this, 1, 228, 154 + 40 * entryIndex, 272, 22, 0, 0, formatHTMLCharName(entryIndex, e.Name, (m_charSelected == entryIndex ? 431 : 1278))); AddControl(new ResizePic(this, m_characterNames[entryIndex])); AddControl(m_characterNames[entryIndex]); } entryIndex++; } m_charListUpdate = UltimaVars.Characters.UpdateValue; } base.Update(gameTime); }