Page 1 of 1
Changing Submit to continue
Posted: Wed May 19, 2021 7:25 pm
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.
Re: Changing Submit to continue
Posted: Wed May 19, 2021 9:08 pm
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 (30.09 KiB) Viewed 321 times
Re: Changing Submit to continue
Posted: Thu May 20, 2021 4:58 am
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!!
Re: Changing Submit to continue
Posted: Thu May 20, 2021 8:40 am
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.
Re: Changing Submit to continue
Posted: Thu May 20, 2021 9:29 am
by Jose
Thanks, I'll try that.