NPC subtitle and response menus intersecting

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ujuj04
Posts: 30
Joined: Sun May 21, 2023 7:34 pm

NPC subtitle and response menus intersecting

Post by ujuj04 »

Hey, I'm trying to make the dialogue UI for my game and this is the style I decided to go for. Death (Portrait name), Wake up...(NPC subtitle), WHAT no way (response). When my NPC subtitle gets too long, it goes down and intersects with the response section. Can I somehow set them to be relative and in case the NPC subtitles get too long the response options would appear lower relatively.

Also I was inspired by Divinity 2 and how they made their dialogue UI. I want the answer options to be grey by default, but when the player puts their mouse upon it, it goes white, is that possible with the system? I only found similar options on the buttons, but I'm not using them, because of visual preference.

Thanks in advance!!!
Attachments
Example1.png
Example1.png (258.89 KiB) Viewed 280 times
User avatar
Tony Li
Posts: 22129
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC subtitle and response menus intersecting

Post by Tony Li »

Hi,

Yes, you can do all that with standard Unity UI, which is what the dialogue UI uses.

To prevent the NPC subtitle from intersecting the response section, put them both in a Vertical Layout Group. See the WRPG template dialogue UI for an example. It has a Scroll Rect, too, but the Scroll Rect isn't required. The WRPG template dialogue UI accumulates text as the conversation progresses. If you don't want to accumulate text, inspect the subtitle panel(s) and untick Accumulate Text.

To make the answer options grey by default, assign the text element (Text or TextMeshProUGUI) to the Button's Target Graphic field. Set the text element's color to white (255, 255, 255). On the Button, set the Normal color to grey and the Selected and Highlighted colors to white.
ujuj04
Posts: 30
Joined: Sun May 21, 2023 7:34 pm

Re: NPC subtitle and response menus intersecting

Post by ujuj04 »

Hey thanks a lot for the help! A question: in WRPG the NPC name is changing between player and NPC, how do I only keep NPC name?
User avatar
Tony Li
Posts: 22129
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC subtitle and response menus intersecting

Post by Tony Li »

Hi,

Inspect the subtitle panel, and tick Only Show NPC Portraits.
ujuj04
Posts: 30
Joined: Sun May 21, 2023 7:34 pm

Re: NPC subtitle and response menus intersecting

Post by ujuj04 »

yep, it helped, thx!
User avatar
Tony Li
Posts: 22129
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC subtitle and response menus intersecting

Post by Tony Li »

Glad to help!
Post Reply