public static void DoMainMenuControls(Rect rect, bool anyMapFiles)
        {
            GUI.BeginGroup(rect);
            Rect rect2 = new Rect(0f, 0f, 170f, rect.height);
            Rect rect3 = new Rect(rect2.xMax + 17f, 0f, 145f, rect.height);

            Text.Font = GameFont.Small;
            List <ListableOption> list = new List <ListableOption>();

            if (Current.ProgramState == ProgramState.Entry)
            {
                string label;
                if (!"Tutorial".CanTranslate())
                {
                    label = "LearnToPlay".Translate();
                }
                else
                {
                    label = "Tutorial".Translate();
                }
                list.Add(new ListableOption(label, delegate
                {
                    MainMenuDrawer.InitLearnToPlay();
                }, null));
                list.Add(new ListableOption("NewColony".Translate(), delegate
                {
                    Find.WindowStack.Add(new Page_SelectScenario());
                }, null));
            }
            if (Current.ProgramState == ProgramState.Playing && !Current.Game.Info.permadeathMode)
            {
                list.Add(new ListableOption("Save".Translate(), delegate
                {
                    MainMenuDrawer.CloseMainTab();
                    Find.WindowStack.Add(new Dialog_SaveFileList_Save());
                }, null));
            }
            ListableOption item;

            if (anyMapFiles && (Current.ProgramState != ProgramState.Playing || !Current.Game.Info.permadeathMode))
            {
                item = new ListableOption("LoadGame".Translate(), delegate
                {
                    MainMenuDrawer.CloseMainTab();
                    Find.WindowStack.Add(new Dialog_SaveFileList_Load());
                }, null);
                list.Add(item);
            }
            if (Current.ProgramState == ProgramState.Playing)
            {
                list.Add(new ListableOption("ReviewScenario".Translate(), delegate
                {
                    WindowStack arg_29_0       = Find.WindowStack;
                    string fullInformationText = Find.Scenario.GetFullInformationText();
                    string name = Find.Scenario.name;
                    arg_29_0.Add(new Dialog_MessageBox(fullInformationText, null, null, null, null, name, false, null, null));
                }, null));
            }
            item = new ListableOption("Options".Translate(), delegate
            {
                MainMenuDrawer.CloseMainTab();
                Find.WindowStack.Add(new Dialog_Options());
            }, "MenuButton-Options");
            list.Add(item);
            if (Current.ProgramState == ProgramState.Entry)
            {
                item = new ListableOption("Mods".Translate(), delegate
                {
                    Find.WindowStack.Add(new Page_ModsConfig());
                }, null);
                list.Add(item);
                if (Prefs.DevMode && LanguageDatabase.activeLanguage == LanguageDatabase.defaultLanguage && LanguageDatabase.activeLanguage.anyError)
                {
                    item = new ListableOption("SaveTranslationReport".Translate(), delegate
                    {
                        LanguageReportGenerator.SaveTranslationReport();
                    }, null);
                    list.Add(item);
                }
                item = new ListableOption("Credits".Translate(), delegate
                {
                    Find.WindowStack.Add(new Screen_Credits());
                }, null);
                list.Add(item);
            }
            if (Current.ProgramState == ProgramState.Playing)
            {
                if (Current.Game.Info.permadeathMode)
                {
                    item = new ListableOption("SaveAndQuitToMainMenu".Translate(), delegate
                    {
                        LongEventHandler.QueueLongEvent(delegate
                        {
                            GameDataSaveLoader.SaveGame(Current.Game.Info.permadeathModeUniqueName);
                            MemoryUtility.ClearAllMapsAndWorld();
                        }, "Entry", "SavingLongEvent", false, null);
                    }, null);
                    list.Add(item);
                    item = new ListableOption("SaveAndQuitToOS".Translate(), delegate
                    {
                        LongEventHandler.QueueLongEvent(delegate
                        {
                            GameDataSaveLoader.SaveGame(Current.Game.Info.permadeathModeUniqueName);
                            LongEventHandler.ExecuteWhenFinished(delegate
                            {
                                Root.Shutdown();
                            });
                        }, "SavingLongEvent", false, null);
                    }, null);
                    list.Add(item);
                }
                else
                {
                    Action action = delegate
                    {
                        if (GameDataSaveLoader.CurrentGameStateIsValuable)
                        {
                            Find.WindowStack.Add(Dialog_MessageBox.CreateConfirmation("ConfirmQuit".Translate(), delegate
                            {
                                GenScene.GoToMainMenu();
                            }, true, null));
                        }
                        else
                        {
                            GenScene.GoToMainMenu();
                        }
                    };
                    item = new ListableOption("QuitToMainMenu".Translate(), action, null);
                    list.Add(item);
                    Action action2 = delegate
                    {
                        if (GameDataSaveLoader.CurrentGameStateIsValuable)
                        {
                            Find.WindowStack.Add(Dialog_MessageBox.CreateConfirmation("ConfirmQuit".Translate(), delegate
                            {
                                Root.Shutdown();
                            }, true, null));
                        }
                        else
                        {
                            Root.Shutdown();
                        }
                    };
                    item = new ListableOption("QuitToOS".Translate(), action2, null);
                    list.Add(item);
                }
            }
            else
            {
                item = new ListableOption("QuitToOS".Translate(), delegate
                {
                    Root.Shutdown();
                }, null);
                list.Add(item);
            }
            OptionListingUtility.DrawOptionListing(rect2, list);
            Text.Font = GameFont.Small;
            List <ListableOption> list2 = new List <ListableOption>();
            ListableOption        item2 = new ListableOption_WebLink("FictionPrimer".Translate(), "https://rimworldgame.com/backstory", TexButton.IconBlog);

            list2.Add(item2);
            item2 = new ListableOption_WebLink("LudeonBlog".Translate(), "https://ludeon.com/blog", TexButton.IconBlog);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("Forums".Translate(), "https://ludeon.com/forums", TexButton.IconForums);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("OfficialWiki".Translate(), "https://rimworldwiki.com", TexButton.IconBlog);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("TynansTwitter".Translate(), "https://twitter.com/TynanSylvester", TexButton.IconTwitter);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("TynansDesignBook".Translate(), "https://tynansylvester.com/book", TexButton.IconBook);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("HelpTranslate".Translate(), MainMenuDrawer.TranslationsContributeURL, TexButton.IconForums);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("BuySoundtrack".Translate(), "http://www.lasgameaudio.co.uk/#!store/t04fw", TexButton.IconSoundtrack);
            list2.Add(item2);
            float num = OptionListingUtility.DrawOptionListing(rect3, list2);

            GUI.BeginGroup(rect3);
            if (Current.ProgramState == ProgramState.Entry && Widgets.ButtonImage(new Rect(0f, num + 10f, 64f, 32f), LanguageDatabase.activeLanguage.icon))
            {
                List <FloatMenuOption> list3 = new List <FloatMenuOption>();
                foreach (LoadedLanguage current in LanguageDatabase.AllLoadedLanguages)
                {
                    LoadedLanguage localLang = current;
                    list3.Add(new FloatMenuOption(localLang.FriendlyNameNative, delegate
                    {
                        LanguageDatabase.SelectLanguage(localLang);
                        Prefs.Save();
                    }, MenuOptionPriority.Default, null, null, 0f, null, null));
                }
                Find.WindowStack.Add(new FloatMenu(list3));
            }
            GUI.EndGroup();
            GUI.EndGroup();
        }
 private static void <DoMainMenuControls> m__0()
 {
     MainMenuDrawer.InitLearnToPlay();
 }