Page 1 of 1

Interface that simulates a fake WhatsApp / Telegram

Posted: Wed Oct 10, 2018 11:32 pm
by kopanu
Hi, I'm interested in this Asset because I'm trying to create a mobile device for my player, where I can have conversations with others NPCs as if they were talking on WhatsApp / Telegram.

I see there are several examples, but I do not know if any of them is compatible with TesxtMesh Pro and above all, if it allows to reproduce in the conversation messages that attach images, videos or audio notes as in WhatsApp, where you can play those contents during the conversation when you click on those messages.

Image

Would it be compatible to do this?

Thanks a lot for everything, kind regards

Re: Interface that simulates a fake WhatsApp / Telegram

Posted: Thu Oct 11, 2018 10:41 am
by Tony Li
Hi,

See here.

Re: Interface that simulates a fake WhatsApp / Telegram

Posted: Thu Oct 11, 2018 11:01 am
by kopanu
Thank you very much for the reply

I still do not understand the part of being able to play multimedia content by clicking on messages, like when in WhatsApp we send photos, videos or audios in a message, when clicking on them, audio files are played or the videos / images are opened in full screen.

Is it possible to do this?

Image
Image

Re: Interface that simulates a fake WhatsApp / Telegram

Posted: Thu Oct 11, 2018 11:11 am
by Tony Li
Sorry, I missed that part of your message. That will require a little bit of scripting. The Textline project currently displays text and optional portrait images. If you're using TextMesh Pro, your text can contain inline sprites (e.g., photos), but not video or audio unless you add it yourself with some script changes.

Re: Interface that simulates a fake WhatsApp / Telegram

Posted: Thu Oct 11, 2018 7:05 pm
by kopanu
Thank you very much Tony.
Is there an example, documentation or tutorial that explains how to add more features with our own scripts to the Asset?

Re: Interface that simulates a fake WhatsApp / Telegram

Posted: Thu Oct 11, 2018 7:18 pm
by Tony Li
Hi,

There's a bit of each. You'll certainly want to read the Overview and do the Quick Start tutorial to familiarize yourself with the Dialogue System in general.

Then read about Dialogue UIs and/or watch the Dialogue UI tutorial.

You may want to bookmark the Scripting section.

As for examples, source code is included with everything, including the Textline addon and Subsurface Similar example. The comments in the source code should help point you in the right direction.

If you start with Textline, I can think of two approaches. I'll admit that I haven't thought these ideas out thoroughly, so I don't know which one is preferable, or if there's a better different option.

1. You could modify the TextlineDialogueUI script's AddMessage() method to also set additional audiovisual UI elements.

2. Or you could leave TextlineDialogueUI untouched. Instead, define a subclass of StandardUISubtitlePanel that contains additional UI elements. Override its ShowSubtitle() method to also set these additional UI elements, possibly pulling them from custom tags in the subtitle's text. Then use this subclass instead of StandardUISubtitlePanel in your dialogue UI.