Exemplo n.º 1
0
        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();
                        });
                    }
                }
            }
        }
Exemplo n.º 2
0
    void Start()
    {
        dialogueScript = GameObject.Find("NeighborPrefab").GetComponent <DialogueTextBox> ();


        originalRotation.eulerAngles = new Vector3(41f, 0, 0);
        originalCameraPosition       = originalCameraPositionGO.position;
    }
Exemplo n.º 3
0
 public void PushDialogueTextBox(string dialogue)
 {
     Application.Current.Dispatcher.Invoke(() =>
     {
         DialogueTextBox.Text += $"{Environment.NewLine}{dialogue}";
         DialogueTextBox.ScrollToEnd();
     });
 }
Exemplo n.º 4
0
 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();
 }
Exemplo n.º 5
0
 private void MaskGrid_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
 {
     DialogueTextBox.RaiseEvent(e);
 }
Exemplo n.º 6
0
 void Start()
 {
     dialogueScript = GetComponent <DialogueTextBox> ();
     player         = GameObject.FindGameObjectWithTag("Player").transform;
 }