private void OnInputComplete(string input) { if (!string.IsNullOrEmpty(input)) { if (this.m_receiver.IsOnline()) { BnetWhisperMgr.Get().SendWhisper(this.m_receiver, input); ChatMgr.Get().AddRecentWhisperPlayerToTop(this.m_receiver); } else if (ChatMgr.Get().IsChatLogFrameShown()) { if (!BnetWhisperMgr.Get().SendWhisper(this.m_receiver, input)) { this.m_chatLogFrame.m_chatLog.OnWhisperFailed(); } ChatMgr.Get().AddRecentWhisperPlayerToTop(this.m_receiver); } else { object[] args = new object[] { this.m_receiver.GetBestName() }; string message = GameStrings.Format("GLOBAL_CHAT_RECEIVER_OFFLINE", args); UIStatus.Get().AddError(message); } } if (ChatMgr.Get().IsChatLogFrameShown()) { this.ShowInput(false); } else { UnityEngine.Object.Destroy(base.gameObject); } }
private void OnInputComplete(string inputCommand) { this.m_inputActive = false; inputCommand = inputCommand.TrimStart(new char[0]); if (!string.IsNullOrEmpty(inputCommand)) { string str = this.ProcessCheat(inputCommand); if (!string.IsNullOrEmpty(str)) { UIStatus.Get().AddError(str); } } }
// Write a message to the UI Screen public static void say(string msg, bool is_error = false, string log = default_ui_log_name) { // Determine if we're to print an error message, or an ordinary message if (is_error) { // Add Error, and print via error printer UIStatus.Get().AddError(msg); Log.error("UI ::: " + msg, log); } else { // Add Info, and print via logger UIStatus.Get().AddInfo(msg); Log.log("UI ::: " + msg, log); } }
private void TakeScreenshot() { string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); DateTime now = DateTime.Now; string path = string.Format("{0}/Hearthstone Screenshot {1:MM-dd-yy HH.mm.ss}.png", folderPath, now); int num = 1; while (System.IO.File.Exists(path)) { path = string.Format("{0}/Hearthstone Screenshot {1:MM-dd-yy HH.mm.ss} {2}.png", folderPath, now, num++); } UIStatus.Get().HideIfScreenshotMessage(); Application.CaptureScreenshot(path); base.StartCoroutine(this.NotifyOfScreenshotComplete()); UnityEngine.Debug.Log(string.Format("screenshot saved to {0}", path)); }
private void OnInputSubmitted(string input) { string email = !this.m_usePlayer ? input.Trim() : this.m_player.GetBattleTag().ToString(); if (email.Contains("@")) { BnetFriendMgr.Get().SendInviteByEmail(email); } else if (email.Contains("#")) { BnetFriendMgr.Get().SendInviteByBattleTag(email); } else { string message = GameStrings.Get("GLOBAL_ADDFRIEND_ERROR_MALFORMED"); UIStatus.Get().AddError(message); } this.OnClosed(); }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; switch (num) { case 0: this.$current = null; this.$PC = 1; return(true); case 1: UIStatus.Get().AddInfo(GameStrings.Get("GLOBAL_SCREENSHOT_COMPLETE"), true); this.$PC = -1; break; } return(false); }
private bool InitReceiver() { this.m_receiver = null; if (this.m_recentPlayers.Count == 0) { string str; if (BnetFriendMgr.Get().GetOnlineFriendCount() == 0) { str = GameStrings.Get("GLOBAL_CHAT_NO_FRIENDS_ONLINE"); } else { str = GameStrings.Get("GLOBAL_CHAT_NO_RECENT_CONVERSATIONS"); } UIStatus.Get().AddError(str); return(false); } this.m_receiver = this.m_recentPlayers[0]; return(true); }
private bool OnBnetError(BnetErrorInfo info, object userData) { BnetFeature feature = info.GetFeature(); BnetFeatureEvent featureEvent = info.GetFeatureEvent(); if ((feature == BnetFeature.Friends) && (featureEvent == BnetFeatureEvent.Friends_OnSendInvitation)) { string str; switch (info.GetError()) { case BattleNetErrors.ERROR_OK: str = GameStrings.Get("GLOBAL_ADDFRIEND_SENT_CONFIRMATION"); UIStatus.Get().AddInfo(str); return(true); case BattleNetErrors.ERROR_FRIENDS_FRIENDSHIP_ALREADY_EXISTS: str = GameStrings.Get("GLOBAL_ADDFRIEND_ERROR_ALREADY_FRIEND"); UIStatus.Get().AddError(str); return(true); } } return(false); }
public static void Message(string message) { UIStatus.Get().AddInfo(message); }
private void Notify(string message) { Log(message); UIStatus.Get().AddInfo(message); }
public static void say(string msg) { log(msg); UIStatus.Get().AddInfo(msg); }
public static void AddErrorMsg(string msg) { UIStatus.Get().AddError(msg); }
public static void AddInfoMsg(string msg) { UIStatus.Get().AddInfo(msg); }
/// <summary> /// Display trace info to screen. /// </summary> /// <param name="message">The trace info.</param> public void ShowRockInfo(string message) { UIStatus.Get().AddInfo(message); this.tracer.Info(message); }