private void OnTutorialReset() { ConfirmDialogScreen component = ActivateChildScreen(ScreenPrefabs.Instance.ConfirmDialogScreen.gameObject).GetComponent <ConfirmDialogScreen>(); component.PopupConfirmDialog(UI.FRONTEND.OPTIONS_SCREEN.RESET_TUTORIAL_WARNING, delegate { Tutorial.ResetHiddenTutorialMessages(); }, delegate { }, null, null, null, null, null, null, true); component.Activate(); }
private void OnUnlockSandboxMode() { ConfirmDialogScreen component = ActivateChildScreen(ScreenPrefabs.Instance.ConfirmDialogScreen.gameObject).GetComponent <ConfirmDialogScreen>(); component.PopupConfirmDialog(UI.FRONTEND.OPTIONS_SCREEN.TOGGLE_SANDBOX_SCREEN.UNLOCK_SANDBOX_WARNING, delegate { SaveGame.Instance.sandboxEnabled = true; SetSandboxModeActive(SaveGame.Instance.sandboxEnabled); TopLeftControlScreen.Instance.UpdateSandboxToggleState(); Deactivate(); }, delegate { string savePrefixAndCreateFolder = SaveLoader.GetSavePrefixAndCreateFolder(); string text2 = savePrefixAndCreateFolder; savePrefixAndCreateFolder = text2 + "\\" + SaveGame.Instance.BaseName + UI.FRONTEND.OPTIONS_SCREEN.TOGGLE_SANDBOX_SCREEN.BACKUP_SAVE_GAME_APPEND + ".sav"; SaveLoader.Instance.Save(savePrefixAndCreateFolder, false, false); SetSandboxModeActive(SaveGame.Instance.sandboxEnabled); TopLeftControlScreen.Instance.UpdateSandboxToggleState(); Deactivate(); }, UI.FRONTEND.OPTIONS_SCREEN.TOGGLE_SANDBOX_SCREEN.CANCEL, delegate { }, cancel_text: UI.FRONTEND.OPTIONS_SCREEN.TOGGLE_SANDBOX_SCREEN.CONFIRM_SAVE_BACKUP, title_text: null, confirm_text: UI.FRONTEND.OPTIONS_SCREEN.TOGGLE_SANDBOX_SCREEN.CONFIRM, image_sprite: null, activateBlackBackground: true); component.Activate(); }