Cancel Key to be attached to a separate UI Button

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Greysize
Posts: 3
Joined: Tue May 17, 2022 6:35 am

Cancel Key to be attached to a separate UI Button

Post by Greysize »

Hi,

I'm currently developing a title for VR and I would need to have access to the Cancel function given by this input
DialogueManager.Instance.displaySettings.inputSettings.cancel.key;

But to be able to send it from a UI button and not a keypress.

Any Lead on how to wire that up?

Many Thanks
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cancel Key to be attached to a separate UI Button

Post by Tony Li »

Hi,

You could configure your UI Button to call DialogueManager.StopConversation() instead.
Greysize
Posts: 3
Joined: Tue May 17, 2022 6:35 am

Re: Cancel Key to be attached to a separate UI Button

Post by Greysize »

Hi,

StopConversation() actually stop entirely the conversation I need to skip any Sequencecommand and move to the next response.

Many Thanks
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cancel Key to be attached to a separate UI Button

Post by Tony Li »

You can set up your UI Button as a continue button on your subtitle panel. To see an example, open DemoScene1, set the Dialogue Manager's Subtitle Settings > Continue Button dropdown to Always, and play the scene. You will see that the subtitle panel shows a continue button that will skip ahead to the next response.
Greysize
Posts: 3
Joined: Tue May 17, 2022 6:35 am

Re: Cancel Key to be attached to a separate UI Button

Post by Greysize »

Hi,

Yeah I was silly I forgot to add a script on the button

StandardUIContinueButtonFastForward

And also add a OnClick() Event leading to StandardUIContinueButtonFastForward>OnFastForward()

Many thanks Toni,

David
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cancel Key to be attached to a separate UI Button

Post by Tony Li »

Glad to help!
Post Reply