public void TypeInfo(int page) { CurrentPage = page; sets = ArenaControl.GetSets(t.TeamSize); int index = sets.Count / 5; int pages = (sets.Count % 5 == 0 ? index : (index + 1)); int i; AddPage(0); AddBackground(0, 44, 260, 110 + index * 30, 9250); AddBackground(0, 0, 260, 47, 9250); AddLabel(100, 14, 0, @"Arena Sets"); if (sets.Count < ((page + 1) * 5)) { index = sets.Count - page * 5; } else { index = 5; } for (i = 1; i < index + 1; i++) { AddLabel(60, 30 + i * 30, 0, sets[i - 1]); AddButton(218, 30 + i * 30, t.ArenaSets.Contains(sets[i - 1]) ? 4017 : 4020, t.ArenaSets.Contains(sets[i - 1]) ? 4019 : 4022, i, GumpButtonType.Reply, 0); } AddButton(218, 58 + index * 30, 4023, 4025, 0, GumpButtonType.Reply, 0); // OK Button }
public void TypeInfo(int page) { CurrentPage = page; sets = ArenaControl.GetSets(a.Type); int index = sets.Count / 5; int pages = (sets.Count % 5 == 0 ? index : (index + 1)); int i; AddPage(0); AddBackground(0, 44, 260, 240, 9250); AddBackground(0, 0, 260, 47, 9250); AddLabel(100, 14, 0, @"Arena Sets"); if (sets.Count < ((page + 1) * 5)) { index = sets.Count - page * 5; } else { index = 5; } for (i = 1; i < index + 1; i++) { AddLabel(60, 60 + i * 30, 0, sets[i - 1]); AddRadio(25, 60 + i * 30, 208, 209, sets[i - 1].Equals(a.Set) ? true : false, i); } AddLabel(60, 60, 0, String.Format("New Set: {0}", a.Name)); AddRadio(25, 60, 208, 209, false, 0); AddButton(218, 248, 4005, 4007, 1, GumpButtonType.Reply, 0); }