Answer speech bubbles

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
OneManOnMars
Posts: 105
Joined: Tue Apr 05, 2016 9:37 am

Answer speech bubbles

Post by OneManOnMars »

Hi Pixel Crushers,

I would like to add an answer panel to my main character. I'm using on world space canvas. So I added a dialogue Actor to my Hero. As a custom Panel I am using a modified version of the example Bubble Standard UI Menu Panel.

But before I go into the issue I am facing let me quickly explain what I would like to achieve.

Image

I would like to have a bubble with 2 up to 4 possible answers ordered in one column like shown above. The first answer should be selected at start. Like the example I am using a button image to highlight the selection.
The selection should change on input of the analog stick/d-pad.
Since this is a console title I need a confirmation button to confirm the selection.

Image

I removed all the content fitters and horizontal or vertical or horizontal layout groups. Since I just don't understand fully how this works. :?:
I simply placed everything by hand. Which seems to work as well but just you know how it is setup.
My testsample only has three answers, I would like to add one more.
Image
I guess I simply have to add one Respons Panel on top and add it to the list on the Button List of the Standard UI Menu Panel.

But here are the problems I'am facing. I can only select two of the answers right now. I did not figure out how this works. All the response buttons are set to automatic. I did also test vertical. With no success.

And when the bubble opens. I have to push the b-button (xbox360 gamepad) twice before I can see the selection of the first answer.

And I don't know where to define the confirm button, right now it is the a-button. But it should be the y-button.

I'll try to set up the rest of the layout now and let me already say thank you for your support!
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Answer speech bubbles

Post by Tony Li »

Hi,
OneManOnMars wrote: Thu Sep 10, 2020 4:36 amI can only select two of the answers right now.
Make sure you've added all of the buttons to the StandardUIMenuPanel component's Buttons list. For each menu, the Dialogue System will show as many buttons as needed and deactivate the rest. If you want the panel to resize itself to fit the number of active buttons, add a Content Size Fitter.
OneManOnMars wrote: Thu Sep 10, 2020 4:36 amAnd when the bubble opens. I have to push the b-button (xbox360 gamepad) twice before I can see the selection of the first answer.
Inspect the Dialogue Manager. Tick the Input Device Manager's Always Auto Focus checkbox. It sounds like the Input Device Manager is switching to Mouse mode, in which it does not select the first answer unless Always Auto Focus is ticked. Or you can untick Detect Mouse Control to prevent it from going into Mouse mode in the first place, but then the mouse cursor won't become visible when the player moves the mouse. (Which may be what you want, if you're aiming for console.) Pressing the gamepad's b-button switches the Input Device Manager back to Joystick mode, which keeps a response button selected so you can navigate them with the gamepad.
OneManOnMars wrote: Thu Sep 10, 2020 4:36 amAnd I don't know where to define the confirm button, right now it is the a-button. But it should be the y-button.
By default, the Dialogue System uses standard Unity UI. Input in Unity UI is handled through the EventSystem GameObject, specifically the StandaloneInputModule component. This component has a Submit field whose value defaults to the input definition "Submit". Select menu item Edit > Project Settings and go to Input. Then you can either change what inputs are assigned to Submit, or add a new input definition and update the StandaloneInputModule's Submit field.
OneManOnMars
Posts: 105
Joined: Tue Apr 05, 2016 9:37 am

Re: Answer speech bubbles

Post by OneManOnMars »

Thank you Tony!

I am not sure why but the second Response Button does not work. I have this setup here:

Image

If I have 3 answers, 1 and 3 can be selected. If I have only 2 only the first one can be selected!

Image

Image

Do you have an idea why this could be the case?

The Focus does work now! Thank you!
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Answer speech bubbles

Post by Tony Li »

Maybe it's a Unity UI navigation issue. Inspect each UI Button and change the Navigation dropdown so only Explicit is ticked.

Then set Response Button 1's Select On Down to Response Button 2.

Set Response Button 2's Select On Up to Response Button 1, and set Select On Down to Response Button 3.

Do similarly for Response Buttons 3 & 4.

The Dialogue System currently has an option to automatically set up this kind of explicit navigation for instantiated buttons (i.e., instantiated from the Button Template) but not for buttons in the Buttons list.

In the next version, I plan to add an option to set up explicit navigation vertically or horizontally for the Buttons list, too.
OneManOnMars
Posts: 105
Joined: Tue Apr 05, 2016 9:37 am

Re: Answer speech bubbles

Post by OneManOnMars »

Tony, you are the man! If you would look up "great support" there would be a picture of you in there! (Monkey Island reference but meant totally honest.) I am happy it is working now!

Image
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Answer speech bubbles

Post by Tony Li »

:D Glad to help!
Post Reply