Changing Submit to continue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Jose
Posts: 3
Joined: Wed May 19, 2021 7:19 pm

Changing Submit to continue

Post by Jose »

Hi, how can I change the submit options to not be the submit button from the eventmanager but a custom button from the input manager?

The case is that the SUBMIT button is assigned to a gamepad trigger and I need to interact with the A button, which is not in the event manager.

sorry if I'm not clear, english is not my native language.

Thanks for your help.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Changing Submit to continue

Post by Tony Li »

Hi,

Add a UI Button Key Trigger component to the Continue Button. Set the Key to Joystick Button 0, or set up an input button and specify it in the Button field.
uiButtonKeyTrigger.png
uiButtonKeyTrigger.png (30.09 KiB) Viewed 305 times
Jose
Posts: 3
Joined: Wed May 19, 2021 7:19 pm

Re: Changing Submit to continue

Post by Jose »

Thank you for your reply, Tony.

how can I do that in the Basic Standard Dialogue UI? I edited the prefab and added the component to the "Response Button Template" but it keeps listening the submit button from the eventsystem (the rear trigger) and when I press the A button, it selects always the same option, no matter what option I'm selecting in the dialogue.

Please let me know if I'm doing something wrong or what else can I try.

Thank you!!
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Changing Submit to continue

Post by Tony Li »

Hi,

My instructions above were for the subtitle panel's continue button.

To map hotkeys to response buttons, there are two different types of response buttons:

1. Response buttons that are instantiated at runtime. This is what the Basic Standard Dialogue UI uses. It creates copies of the Response Button Template.

2. Or a predefined list of response buttons that you've assigned to the menu panel's Buttons list at design time. The Wheel Standard Dialogue UI is an example.

For #2 (predefined list of Buttons), add a UI Button Key Trigger to each button, and assign the hotkey (e.g., Joystick Button 0, Joystick Button 1, etc., -- or input names defined in Edit > Project Settings > Input).

For #1 (response buttons instantiated from the Response Button Template), you can map number keys (1, 2, 3, etc.) to these response buttons by ticking the menu panel's Autonumber > Enabled checkbox. If you need to map different inputs (not number keys), you'll have to instead make a subclass of StandardUIMenuPanel and override the SetResponseButtons method to add UI Button Key Triggers at runtime.
Jose
Posts: 3
Joined: Wed May 19, 2021 7:19 pm

Re: Changing Submit to continue

Post by Jose »

Thanks, I'll try that.
Post Reply