private void RefreshDialogueTextBox(object state) { if (ChatQueue.rq.Any()) { var result = ChatQueue.rq.TryDequeue(out string msg); if (result) { msg = Regex.Replace(msg, @"\uE03C", "[HQ]"); msg = Regex.Replace(msg, @"\uE06F", "⇒"); msg = Regex.Replace(msg, @"\uE0BB", string.Empty); msg = Regex.Replace(msg, @"\uFFFD", string.Empty); if (msg.IndexOf('\u0002') == 0) { var filter = regexItem.Match(msg); if (filter.Success) { msg = filter.Groups[1].Value; } } if (!msg.Equals(string.Empty)) { var translated = ironworksContext.TranslateChat(msg, ironworksSettings.Translator.DialogueLanguage); Application.Current.Dispatcher.Invoke(() => { DialogueTextBox.Text += $"{Environment.NewLine}{translated}"; DialogueTextBox.ScrollToEnd(); }); } } } }
void Start() { dialogueScript = GameObject.Find("NeighborPrefab").GetComponent <DialogueTextBox> (); originalRotation.eulerAngles = new Vector3(41f, 0, 0); originalCameraPosition = originalCameraPositionGO.position; }
public void PushDialogueTextBox(string dialogue) { Application.Current.Dispatcher.Invoke(() => { DialogueTextBox.Text += $"{Environment.NewLine}{dialogue}"; DialogueTextBox.ScrollToEnd(); }); }
private void Window_SizeChanged(object sender, SizeChangedEventArgs e) { if (ironworksSettings != null) { var window = sender as Window; ironworksSettings.UI.DialogueWindowWidth = window.Width; ironworksSettings.UI.DialogueWindowHeight = window.Height; } DialogueTextBox.ScrollToEnd(); }
private void MaskGrid_PreviewMouseWheel(object sender, MouseWheelEventArgs e) { DialogueTextBox.RaiseEvent(e); }
void Start() { dialogueScript = GetComponent <DialogueTextBox> (); player = GameObject.FindGameObjectWithTag("Player").transform; }