Page 1 of 1

Auto focus

Posted: Sat Jan 16, 2016 5:57 pm
by quibbles
Hi,

I enabled Auto focus so that it's possible to navigate the response system using the keyboard. I have it set so that the player interacts with NPCs via the enter key, as well as using the enter key to go to the next subtitle. However, with autofocus enabled, it breaks the fast forward ability; pressing enter will automatically go to the next line instead of finishing the current line and then waiting for another press of the enter key in order to go to the next line.

What can I do to fix this?

Thanks.

Re: Auto focus

Posted: Sat Jan 16, 2016 7:19 pm
by Tony Li
Hi,

If by "using the enter key to go to the next subtitle" you mean setting the Dialogue Manager's Display Settings > Input Settings > Cancel Key to Return, you don't need to do this. Set it to None (or Escape if you like).

When the Dialogue System shows a subtitle, it auto-focuses the continue button. Pressing Enter will click the continue button. If the continue button is set up to fast-forward, it will fast-forward.

If you've also assigned Return to the Cancel Key, it will bypass the whole fast-forward process and immediately "cancel" the subtitle, causing the conversation to move to the next line.

(When the Dialogue System shows the response menu, it auto-focuses the first response button.)

If that isn't what's happening here, please let me know how you've set up your dialogue UI and the Dialogue Manager's Cancel Key.

Re: Auto focus

Posted: Sat Jan 16, 2016 7:33 pm
by quibbles
Hi,

I have the cancel key set to None. However, my dialogue system is behaving as you have described: "If you've also assigned Return to the Cancel Key, it will bypass the whole fast-forward process and immediately "cancel" the subtitle, causing the conversation to move to the next line."

Re: Auto focus

Posted: Sat Jan 16, 2016 8:48 pm
by Tony Li
Hi,

Please try this as a test:

1. Open Examples/Unity UI Examples/Generic UI Example Scene.

2. On the Dialogue Manager, change Display Settings > Subtitle Settings > Continue Button to Always.

3. Expand Dialogue Manager > Canvas and inspect Generic Unity UI Dialogue UI. At the bottom of Unity UI Dialogue UI, tick Auto Focus.

Then play and run up to Private Hart. If you press Enter before the typewriter effect has finished Private Hart's line, it will fast-forward to the end. A second press will advance the conversation to the response menu. Is this the behavior you're looking for?

Re: Auto focus

Posted: Sat Jan 16, 2016 10:02 pm
by quibbles
Yes, this is the effect I am looking for. However, when I tick auto-focus on my current UI's set-up for my game (and not in the example scene), it will not behave like this. It will just skip to the next line. I'm not sure what to change to fix this.

Re: Auto focus

Posted: Sat Jan 16, 2016 11:21 pm
by Tony Li
Can you send your UI to tony (at) pixelcrushers.com? I'll be happy to take a look. Exporting it along with its textures as a unitypackage would work best. An example scene would be ideal.

If that's not possible, please post some screenshots of your UI setup.