public override void AddPage(GuiTabPage page) { base.AddPage(page); if (page is GuiCharacterPage) { ((GuiCharacterPage)page).Character = this.Character; } }
/** * Adds page to list of pages that can be displayed in the tab control */ virtual public void AddPage(GuiTabPage page) { if (Pages.Contains(page)) { throw new Exception("Can not add page: " + page + " to tab control, as it has already been added."); } Pages.Add(page); Add(page); page.Index = Pages.Count - 1; page.Active = false; Buttons.AddItem(page.Index.ToString(), getSpriteForTab(page.Index)); }