Page 1 of 1

I have a question about the continue button.

Posted: Tue Sep 19, 2023 3:40 am
by fbthd1234
Hi.

I want to control the text of this button.

When you press this button, if the conversation continues, if the conversation ends with continue, it's like displaying quit. Like Disco Elysium.

I made my custom script for the continuation button. In addition, the existing FastForward function was tracked and the call method was reviewed.

However, it is not known how to know whether the current active continue button role is a continuation or termination of the conversation.

I need help with this. Can you give me a guide?

Best regards.
Tony Li.

Re: I have a question about the continue button.

Posted: Tue Sep 19, 2023 8:16 am
by Tony Li
Hi,

You can add a script to the continue button that sets the text in its OnEnable() method, such as:

Code: Select all

using UnityEngine;
using PixelCushers.DialogueSystem;
public class SetContinueButtonText : MonoBehaviour
{
    public UITextField buttonText; //<-- ASSIGN IN INSPECTOR.
    
    void OnEnable()
    {
        if (!DialogueManager.isConversationActive) return;
        var text = DialogueManager.currentConversationState.hasAnyResponses ? "Continue" : "End";
        buttonText.text = DialogueManager.GetLocalizedText(text);
    }
}

Re: I have a question about the continue button.

Posted: Wed Sep 20, 2023 12:08 am
by fbthd1234
Thank you.
Have a good day.

Re: I have a question about the continue button.

Posted: Wed Sep 20, 2023 8:25 am
by Tony Li
Glad to help!