public void Set(GumpList g) { this.m_List = new ArrayList((ICollection)g.m_List); foreach (Gump gump in this.ToArray()) { gump.Parent = this.m_Owner; } this.m_Array = (Gump[])null; this.m_Count = this.m_List.Count; Gumps.Invalidate(); }
public void Add(GumpList list) { Gump[] array = list.ToArray(); for (int index = 0; index < array.Length; ++index) { array[index].Parent = this.m_Owner; this.m_List.Add((object)array[index]); } this.m_Array = (Gump[])null; this.m_Count = this.m_List.Count; Gumps.Invalidate(); }
private static void RecurseProcessItemGumps(Gump g, int x, int y, bool isItemGump) { if (isItemGump) { IItemGump itemGump = (IItemGump)g; Item obj = itemGump.Item; obj.MessageX = x + itemGump.xOffset; obj.MessageY = y + itemGump.yOffset; obj.BottomY = y + itemGump.yBottom; obj.MessageFrame = Renderer.m_ActFrames; Gump desktop = Gumps.Desktop; GumpList children = desktop.Children; Gump Child = g; while (Child.Parent != desktop) { Child = Child.Parent; } int num = children.IndexOf(Child); for (int index1 = 0; index1 < MessageManager.m_Messages.Count; ++index1) { if (MessageManager.m_Messages[index1] is GDynamicMessage && ((GDynamicMessage)MessageManager.m_Messages[index1]).Owner == obj) { int index2 = children.IndexOf((Gump)MessageManager.m_Messages[index1]); if (index2 < num && index2 >= 0) { children.RemoveAt(index2); num = children.IndexOf(Child); children.Insert(num + 1, (Gump)MessageManager.m_Messages[index1]); } } } } else { foreach (Gump g1 in g.Children.ToArray()) { if (g1 is IItemGump) { MessageManager.RecurseProcessItemGumps(g1, x + g1.X, y + g1.Y, true); } else if (g1.Children.Count > 0) { MessageManager.RecurseProcessItemGumps(g1, x + g1.X, y + g1.Y, false); } } } }
public Gump(int X, int Y) { this.m_Children = new GumpList(this); this.m_X = X; this.m_Y = Y; }