Ejemplo n.º 1
0
 internal void AddPage(InfoPage infoPage)
 {
     menuGroup.NotifyChildAdded(infoPage.IsVisible());
     infoPage.AddVisibilityListener((visible) =>
     {
         menuGroup.NotifyChildVisible(visible);
     });
 }
Ejemplo n.º 2
0
 internal static void RegisterPage(InfoPage page)
 {
     if (string.IsNullOrEmpty(page.pageName))
     {
         throw new ArgumentException("Mod name must be a non-empty string", "page.pageName");
     }
     else if (modComponentPages.Contains(page))
     {
         throw new ArgumentException("Cannot add the same settings object multiple times", "page");
     }
     else if (modComponentGUI != null)
     {
         throw new InvalidOperationException("RegisterPage called after the GUI has been built.\n"
                                             + "Call this method before Panel_CustomXPSetup::Awake, preferably from your mod's OnLoad method");
     }
     else
     {
         modComponentPages.Add(page);
     }
 }