Solved: Focus Template - Button padding not correct for multi-line text

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Thistis
Posts: 27
Joined: Sat Oct 05, 2019 5:05 pm

Solved: Focus Template - Button padding not correct for multi-line text

Post by Thistis »

Hello,

I tried playing around and adapting the Focus template which is part of the Dialogue Manager and I noticed that when a text is more than one line, the padding inside the button doesn't seem correct:

Image
As you can see, the padding for the first button (Good morning Noodles) and the third (Bruuu Bruuuu?), which have one line of text, looks good. But for the second button (I'm a very long text...), the padding seems to be correct for the left and the right side, but not for top and button.

The Content GameObject of the "Response Button Panel" has a Vertical Layout Group with Padding 8 for all directions and the "Response Button Template" GameObject also has a Vertical Layout Group with the same padding.
How can I make the padding work for answers with more than one line?

All the best,
Evelyn
Last edited by Thistis on Mon Dec 02, 2019 10:31 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Focus Template - Button padding not correct for multi-line text

Post by Tony Li »

Hi Evelyn,

The Response Button Template itself has a Vertical Layout Group component. Increase its Padding > Top & Bottom values. (They're currently zero in the template.)
Thistis
Posts: 27
Joined: Sat Oct 05, 2019 5:05 pm

Re: Focus Template - Button padding not correct for multi-line text

Post by Thistis »

Thanks for your speed reply, that worked like a charm :)
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Solved: Focus Template - Button padding not correct for multi-line text

Post by Tony Li »

Happy to help!
Post Reply