public void Update_OnTick(Timer t) { Profiles.Save(); GMenuItem item = this.m_Shard.Menu; if (item == null) { Engine.UpdateSmartLoginMenu(); } else { for (int i = 0; i < this.m_Shard.Characters.Length; i++) { GMenuItem item2 = this.m_Shard.Characters[i].Menu; if (item2 == null) { item.Add(this.m_Shard.Characters[i].Menu = item2 = new GPlayCharacterMenu(this.m_Shard.Characters[i])); } else { item2.Text = this.m_Shard.Characters[i].Name; } } Gump[] gumpArray = item.Children.ToArray(); for (int j = 0; j < gumpArray.Length; j++) { GPlayCharacterMenu child = gumpArray[j] as GPlayCharacterMenu; if ((child != null) && !this.m_Shard.Contains(child.Character)) { item.Remove(child); } } } }
public void Update_OnTick(Timer t) { Profiles.Save(); GMenuItem item = this.m_Account.Menu; if ((item == null) || ((item == this.m_Server.Menu) && (this.m_Account.Shards.Length != 1))) { Engine.UpdateSmartLoginMenu(); } else if (this.m_Account.Shards.Length > 1) { for (int i = 0; i < this.m_Account.Shards.Length; i++) { GMenuItem item2 = this.m_Account.Shards[i].Menu; if (item2 == null) { item.Add(this.m_Account.Shards[i].Menu = item2 = new GShardMenu(this.m_Account.Shards[i])); } else { item2.Text = this.m_Account.Shards[i].Name; } } Gump[] gumpArray = item.Children.ToArray(); for (int j = 0; j < gumpArray.Length; j++) { GShardMenu child = gumpArray[j] as GShardMenu; if ((child != null) && !this.m_Account.Contains(child.Shard)) { item.Remove(child); } } } }
public GInfoForm() : base(0, 0, 400, 430) { base.m_NonRestrictivePicking = true; base.Client.m_NonRestrictivePicking = true; Gumps.Focus = this; base.Text = "Information Browser"; InfoProvider[] providerArray = new InfoProvider[] { new CommandInfoProvider(), new CastingInfoProvider(), new SwingInfoProvider() }; GMainMenu toAdd = new GMainMenu((this.Width - 130) - 4, 8); GMenuItem child = new GMenuItem("Change Provider") { DropDown = true }; for (int i = 0; i < providerArray.Length; i++) { child.Add(new ChangeProviderMenu(this, providerArray[i])); } toAdd.Add(child); this.RecurseFormatMenu(child); base.Client.Children.Add(toAdd); this.m_CPMenu = toAdd; this.Provider = providerArray[0]; base.GUID = "Info Browser"; this.Center(); }
private GMenuItem GetMenuFrom(ActionNode n) { GMenuItem mi = new GMenuItem(n.Name); for (int i = 0; i < n.Nodes.Count; i++) { mi.Add(this.GetMenuFrom((ActionNode)n.Nodes[i])); } for (int j = 0; j < n.Handlers.Count; j++) { ActionHandler action = (ActionHandler)n.Handlers[j]; GMenuItem item2 = new GNewActionMenu(this, this.m_Macro, action); for (int k = 0; (action.Params != null) && (k < action.Params.Length); k++) { item2.Add(this.GetMenuFrom(action.Params[k], null, action)); } mi.Add(this.FormatMenu(item2)); } return(this.FormatMenu(mi)); }
public virtual GMenuItem CreateMenu() { if (this.m_Children.Length > 0) { GMenuItem item = new GMenuItem(this.Name); for (int i = 0; i < this.m_Children.Length; i++) { item.Add(this.m_Children[i].Menu); } return item; } return new InternalMenuItem(this); }
public virtual GMenuItem CreateMenu() { if (this.m_Children.Length > 0) { GMenuItem item = new GMenuItem(this.Name); for (int i = 0; i < this.m_Children.Length; i++) { item.Add(this.m_Children[i].Menu); } return(item); } return(new InternalMenuItem(this)); }
public override Gump CreateGump() { GMainMenu menu = new GMainMenu(0, 0); GMenuItem child = new GMenuItem(base.Name) { DropDown = true }; for (int i = 0; i < this.m_Nodes.Length; i++) { child.Add(this.m_Nodes[i].Menu); } menu.Add(child); this.RecurseFormatMenu(child); return menu; }
public override Gump CreateGump() { GMainMenu menu = new GMainMenu(0, 0); GMenuItem child = new GMenuItem(base.Name) { DropDown = true }; for (int i = 0; i < this.m_Nodes.Length; i++) { child.Add(this.m_Nodes[i].Menu); } menu.Add(child); this.RecurseFormatMenu(child); return(menu); }
public GInfoForm() : base(0, 0, 400, 430) { base.m_NonRestrictivePicking = true; base.Client.m_NonRestrictivePicking = true; Gumps.Focus = this; base.Text = "Information Browser"; InfoProvider[] providerArray = new InfoProvider[] { new CommandInfoProvider(), new CastingInfoProvider(), new SwingInfoProvider() }; GMainMenu toAdd = new GMainMenu((this.Width - 130) - 4, 8); GMenuItem child = new GMenuItem("Change Provider") { DropDown = true }; for (int i = 0; i < providerArray.Length; i++) { child.Add(new ChangeProviderMenu(this, providerArray[i])); } toAdd.Add(child); this.RecurseFormatMenu(child); base.Client.Children.Add(toAdd); this.m_CPMenu = toAdd; this.Provider = providerArray[0]; base.GUID = "Info Browser"; this.Center(); }
private GMenuItem GetMenuFrom(ActionNode n) { GMenuItem mi = new GMenuItem(n.Name); for (int i = 0; i < n.Nodes.Count; i++) { mi.Add(this.GetMenuFrom((ActionNode) n.Nodes[i])); } for (int j = 0; j < n.Handlers.Count; j++) { ActionHandler action = (ActionHandler) n.Handlers[j]; GMenuItem item2 = new GNewActionMenu(this, this.m_Macro, action); for (int k = 0; (action.Params != null) && (k < action.Params.Length); k++) { item2.Add(this.GetMenuFrom(action.Params[k], null, action)); } mi.Add(this.FormatMenu(item2)); } return this.FormatMenu(mi); }