how can I achieve different colors for read and unread text

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
a820715049
Posts: 6
Joined: 14 Apr 2021 11:57

how can I achieve different colors for read and unread text

Post by a820715049 »

how can I achieve different colors for read and unread text? Please help me.

idaot
support
Posts: 262
Joined: 01 Aug 2020 08:25

Re: how can I achieve different colors for read and unread text

Post by idaot »

Hi, it's possible with C#: via the IScriptPlayer engine service, you can check whether the script has played previously by using the HasPlayed method. Attach a script with this check to a DialogueText object and change the color according to the returned bool value.

a820715049
Posts: 6
Joined: 14 Apr 2021 11:57

Re: how can I achieve different colors for read and unread text

Post by a820715049 »

idaot wrote: 06 May 2021 21:55

Hi, it's possible with C#: via the IScriptPlayer engine service, you can check whether the script has played previously by using the HasPlayed method. Attach a script with this check to a DialogueText object and change the color according to the returned bool value.

Thanks for your help! But I still need a little help. How can I check to a DialogueText object When the text changes?

idaot
support
Posts: 262
Joined: 01 Aug 2020 08:25

Re: how can I achieve different colors for read and unread text

Post by idaot »

DialogueText is the default name for the object that houses the text component for displaying text. You can create a new printer by right-clicking in Project window and navigating to Naninovel -> Default Printers -> Choose your preferred printer. By double clicking the object you can access the prefab and you'll find the DialogueText object in there and in its inspector you can attach a new script to it. Here's a guide on how to add said printer:

https://naninovel.com/guide/text-printe ... m-printers

a820715049
Posts: 6
Joined: 14 Apr 2021 11:57

Re: how can I achieve different colors for read and unread text

Post by a820715049 »

idaot wrote: 07 May 2021 17:53

DialogueText is the default name for the object that houses the text component for displaying text. You can create a new printer by right-clicking in Project window and navigating to Naninovel -> Default Printers -> Choose your preferred printer. By double clicking the object you can access the prefab and you'll find the DialogueText object in there and in its inspector you can attach a new script to it. Here's a guide on how to add said printer:

https://naninovel.com/guide/text-printe ... m-printers

Thank you very much!

Post Reply