public override void Initialize() { m_gumplingTop = (GumpPic)AddControl(new GumpPic(this, 0, 0, 0, 0x0820, 0)); m_gumplingMiddle = (GumpPicTiled)AddControl(new GumpPicTiled(this, 0, 0, 0, 0, 0, 0x0822)); m_gumplingBottom = (GumpPic)AddControl(new GumpPic(this, 0, 0, 0, 0x0823, 0)); m_gumplingExpander = (Button)AddControl(new Button(this, 0, 0, 0, 0x082E, 0x82F, ButtonTypes.Activate, 0, gumplingExpander_ButtonID)); m_gumplingExpander.OnMouseDown = expander_OnMouseDown; m_gumplingExpander.OnMouseUp = expander_OnMouseUp; m_gumplingExpander.OnMouseOver = expander_OnMouseOver; }
public override void Update(GameTime gameTime) { if (m_gump == null || m_useLargeMap != UltimaVars.EngineVars.MiniMap_LargeFormat) { m_useLargeMap = UltimaVars.EngineVars.MiniMap_LargeFormat; if (m_gump != null) m_gump.Dispose(); m_gump = new GumpPic(this, 0, 0, 0, (m_useLargeMap ? 5011 : 5010), 0); m_gump.OnMouseClick = onClickMap; m_gump.OnMouseDoubleClick = onDoubleClickMap; m_gump.MakeDragger(this); m_gump.MakeCloseTarget(this); AddControl(m_gump); } base.Update(gameTime); }
public override void Update(GameTime gameTime) { if (m_expandableScrollHeight < m_expandableScrollHeight_Min) m_expandableScrollHeight = m_expandableScrollHeight_Min; if (m_expandableScrollHeight > m_expandableScrollHeight_Max) m_expandableScrollHeight = m_expandableScrollHeight_Max; if (m_gumplingTitleGumpIDDelta) { m_gumplingTitleGumpIDDelta = false; if (m_gumplingTitle != null) m_gumplingTitle.Dispose(); m_gumplingTitle = (GumpPic)AddControl(new GumpPic(this, 0, 0, 0, m_gumplingTitleGumpID, 0)); } if (!m_gumplingTop.IsInitialized) { Visible = false; } else { Visible = true; m_gumplingTop.X = 0; m_gumplingTop.Y = 0; m_gumplingMiddle.X = 17; m_gumplingMiddle.Y = gumplingMidY; m_gumplingMiddle.Width = 263; m_gumplingMiddle.Height = gumplingMidHeight; m_gumplingBottom.X = 17; m_gumplingBottom.Y = gumplingBottomY; m_gumplingExpander.X = gumplingExpanderX; m_gumplingExpander.Y = gumplingExpanderY; if (m_gumplingTitle != null && m_gumplingTitle.IsInitialized) { m_gumplingTitle.X = (m_gumplingTop.Width - m_gumplingTitle.Width) / 2; m_gumplingTitle.Y = (m_gumplingTop.Height - m_gumplingTitle.Height) / 2; } } base.Update(gameTime); }
public override void Update(double totalMS, double frameMS) { if (hasSourceEntity) { m_isFemale = ((Mobile)m_sourceEntity).Flags.IsFemale; m_isElf = false; if (m_sourceEntityUpdateHash != ((Mobile)m_sourceEntity).UpdateTicker) { // update our hash m_sourceEntityUpdateHash = ((Mobile)m_sourceEntity).UpdateTicker; // clear the existing Controls ClearControls(); // Add the base gump - the semi-naked paper doll. if (true) { int bodyID = 12 + (m_isElf ? 2 : 0) + (m_isFemale ? 1 : 0); // ((Mobile)m_sourceEntity).BodyID; GumpPic paperdoll = (GumpPic)AddControl(new GumpPic(this, 0, 0, 0, bodyID, ((Mobile)m_sourceEntity).Hue)); paperdoll.HandlesMouseInput = true; paperdoll.IsPaperdoll = true; } // Loop through the items on the mobile and create the gump pics. for (int i = 0; i < s_DrawOrder.Length; i++) { Item item = ((Mobile)m_sourceEntity).GetItem((int)s_DrawOrder[i]); if (item == null) { continue; } bool canPickUp = true; switch (s_DrawOrder[i]) { case EquipSlots.FacialHair: case EquipSlots.Hair: canPickUp = false; break; default: break; } AddControl(new ItemGumplingPaperdoll(this, 0, 0, item)); ((ItemGumplingPaperdoll)LastControl).SlotIndex = (int)i; ((ItemGumplingPaperdoll)LastControl).IsFemale = m_isFemale; ((ItemGumplingPaperdoll)LastControl).CanPickUp = canPickUp; } // If this object has a backpack, draw it last. if (((Mobile)m_sourceEntity).GetItem((int)EquipSlots.Backpack) != null) { Item backpack = ((Mobile)m_sourceEntity).GetItem((int)EquipSlots.Backpack); AddControl(new GumpPicBackpack(this, 0, -5, 0, backpack)); LastControl.HandlesMouseInput = true; LastControl.OnMouseDoubleClick += dblclick_Backpack; } } } base.Update(totalMS, frameMS); }