コード例 #1
0
 List <FloatMenuOption> IAddonMenu.MenuOptions() => new List <FloatMenuOption>
 {
     new FloatMenuOption("Settings", delegate()
     {
         Window_ModSettings window = new Window_ModSettings(LoadedModManager.GetMod <ToolkitCreator>());
         Find.WindowStack.TryRemove(window.GetType());
         Find.WindowStack.Add(window);
     }),
     new FloatMenuOption("Events", delegate()
     {
         EventsWindow window = new EventsWindow();
         Find.WindowStack.TryRemove(window.GetType());
         Find.WindowStack.Add(window);
     })
 };
コード例 #2
0
        public void DoWindowContents(Rect inRect)
        {
            Listing_Standard listing = new Listing_Standard();

            listing.Begin(inRect);

            if (listing.ButtonText("Events"))
            {
                EventsWindow window = new EventsWindow();
                Find.WindowStack.TryRemove(window.GetType());
                Find.WindowStack.Add(window);
            }

            if (listing.ButtonText("DevWindow"))
            {
                DevWindow window = new DevWindow();
                Find.WindowStack.TryRemove(window.GetType());
                Find.WindowStack.Add(window);
            }

            listing.End();
        }