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!!!
NPC subtitle and response menus intersecting
NPC subtitle and response menus intersecting
- Attachments
-
- Example1.png (258.89 KiB) Viewed 284 times
Re: NPC subtitle and response menus intersecting
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.
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.
Re: NPC subtitle and response menus intersecting
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?
Re: NPC subtitle and response menus intersecting
Hi,
Inspect the subtitle panel, and tick Only Show NPC Portraits.
Inspect the subtitle panel, and tick Only Show NPC Portraits.
Re: NPC subtitle and response menus intersecting
yep, it helped, thx!
Re: NPC subtitle and response menus intersecting
Glad to help!