Page 2 of 2

Re: Customize typewriter stop characters?

Posted: Thu Oct 24, 2019 8:51 am
by Tony Li
Hi,

You could add some code to the beginning of your overridden Play() method that checks for strings such as "...?" and inserts pause codes, such as "...\.?"

Re: Customize typewriter stop characters?

Posted: Thu Oct 24, 2019 8:52 am
by nicmar
Interesting solution, so I manually set the pause codes, and don't use them in the stop codes property. That sounds like it would work! Thanks a lot :)

Re: Customize typewriter stop characters?

Posted: Fri Oct 25, 2019 4:42 pm
by nicmar
Hey, i noticed control.text was the wrong text to modify. So i changed it to here:

Code: Select all

        public override void StartTyping(string text, int fromIndex = 0)
        {
            text = text.Replace("...", "…").Replace("..", "…");
            base.StartTyping(text, fromIndex);
        }
Does this make sense? :)

Re: Customize typewriter stop characters?

Posted: Fri Oct 25, 2019 4:52 pm
by Tony Li
Yes, that's correct. When Play() starts, control.text may not be correct. But the text variable that's passed to Play() is correct.