Page 1 of 1

Overlap Text (and related)

Posted: Thu Oct 20, 2022 12:57 pm
by DLRyy
There is one tiny thing. When I redesigned one UI prefab the subtitle box and the response box overlapped, it wasn't that big of a change but I'm puzzled as to why, I believe it's the anchoring on the parent object, but still I'll ask.
Ideally, the subtitle box takes priority and it pushes the other one into place so that when the NPC ends, well then you can freely respond.

Re: Overlap Text (and related)

Posted: Thu Oct 20, 2022 1:55 pm
by Tony Li
Hi,

That's a Unity UI question, so it will probably depend on which Unity UI layout components you're using. Did you start with one the prefabs that ship with the Dialogue System? If so, which one?

Can you post of screenshots of your setup?

Re: Overlap Text (and related)

Posted: Wed Nov 02, 2022 1:11 pm
by DLRyy
Yes I started with the JRPG classic one

Re: Overlap Text (and related)

Posted: Wed Nov 02, 2022 1:44 pm
by Tony Li
In that prefab, the subtitle panel and response menu panel overlap so the content will be in the same place. When showing a subtitle, the subtitle panel is active. When showing a response menu, the menu panel is active and the subtitle panel is inactive.

If you want the subtitle panel to remain active while showing a response menu, you can do exactly what you said -- move them to different positions, and set the subtitle panel's Visibility to Always From Start or Always Once Shown.

If you want the response menu buttons to appear directly below the subtitle text, you can use Vertical Layout Groups:

jrpgShowSubtitleAndMenu.png
jrpgShowSubtitleAndMenu.png (85.12 KiB) Viewed 335 times

In the example above, I added Vertical Layout Groups to the Text Panel, Subtitle Panel, and Response Menu Panel, with checkboxes configured as shown above, and ticked the same checkboxes on the Response Button Template's Vertical Layout Group. I also ticked the Continue Button's Layout Element > Ignore Layout, and remove the Scroll Rect from the response menu panel. (Side note: This essentially turns it into the same layout as the WRPG prefab.)