Page 1 of 2

Adding a Subtitle Panel to SMS Dialogue UI

Posted: Sun Jul 25, 2021 9:07 am
by bohemian pulp
Hello,

I'm trying to figure out a way to add additional Subtitle Panels to the SMS Dialogue UI. I understand that the Menu Panel Number option on the Dialogue Actor works only on the Standard Dialogue UI, but is there a way to make it work with SMS as well?

Thanks

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Sun Jul 25, 2021 10:11 am
by Tony Li
Hi,

You'll need to make a subclass of SMSDialogueUI.

If you want to show a message outside the context of text messages -- for example, in a separate pop-up window -- override the ShowSubtitle() method.

If you want to show a message as part of the text message thread but with a different subtitle panel template, override the GetTemplate() method. For example:

Code: Select all

public class MyDialogueUI : SMSDialogueUI
{
    protected override StandardUISubtitlePanel GetTemplate(Subtitle subtitle)
    {
        if (subtitle.speakerInfo.nameInDatabase == "Fred")
        {
            return specialSubtitlePanelForFred;
        }
        else
        {
            return base.GetTemplate(subtitle);
        }
    }
}

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Sun Jul 25, 2021 10:40 am
by bohemian pulp
Awesome!
Aaaand one more thing. How do I add a Continue button to the SMS dialogue?

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Sun Jul 25, 2021 11:52 am
by Tony Li
Hi,

Just add one and assign it to the subtitle panel's Continue Button field. You don't need to do anything special for the SMS Dialogue UI.

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Sun Jul 25, 2021 12:24 pm
by bohemian pulp
That was easy... :?

Thanks mate!

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Sun Jul 25, 2021 2:04 pm
by Tony Li
Glad to help!

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Mon Jul 26, 2021 5:27 am
by bohemian pulp
Sorry for accidentally spamming someone else's post.
I set up the Continue button in the SMS UI, but now "SetContinueMode(false)" doesn't seem to work. It might be because there are multiple objects with Standard UI Subtitle Panel that refer to the same Continue Button (NPC Message Template, PC Message Template, etc. all have the component). Any ideas?

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Mon Jul 26, 2021 8:29 am
by Tony Li
Hi,

How are your continue button and conversation set up? (e.g., is the continue button part of a subtitle panel's hierarchy, or is it outside of the subtitle panels?)

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Mon Jul 26, 2021 9:19 am
by bohemian pulp
It's outside

Re: Adding a Subtitle Panel to SMS Dialogue UI

Posted: Mon Jul 26, 2021 11:05 am
by Tony Li
What's not working about SetContinueButton(false)?

Also, are there any errors or warnings in the Console window?

Testing this, I noticed that SetContinueMode(false) works for one node in the SMSDialogueUI. I'll look further into that.