Пример #1
0
 private void ShowWarningPopup(string message, bool addCancel = false, string okMessage = "OK")
 {
     if (_twoButtonPopup == null)
     {
         Console.WriteLine("Failed to create popup for a following message:");
         Console.WriteLine(message);
     }
     _twoButtonPopup.EnableMenu(true);
     _twoButtonPopup.SetUpPopup(message, InputLibrary.confirm, addCancel ? InputLibrary.cancel : null,
                                new ScreenPrompt(InputLibrary.confirm, okMessage), new ScreenPrompt("Cancel"), true, addCancel);
     _twoButtonPopup.GetValue <Text>("_labelText").text = message;
 }
        private void OpenInfoPopup(string message, string okButtonText, string cancelButtonText)
        {
            TwoButtonInfoPopup.SetUpPopup(message, InputLibrary.menuConfirm, InputLibrary.cancel, new ScreenPrompt(okButtonText), new ScreenPrompt(cancelButtonText));

            OWTime.Pause(OWTime.PauseType.Menu);
            OWInput.ChangeInputMode(InputMode.Menu);

            var pauseCommandListener = Locator.GetPauseCommandListener();

            if (pauseCommandListener != null)
            {
                pauseCommandListener.AddPauseCommandLock();
                _addedPauseLock = true;
            }

            TwoButtonInfoPopup.EnableMenu(true);
        }