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); }) };
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(); }