Multiple responses with scrollbar not starting from the top

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Nonungus
Posts: 4
Joined: Thu Feb 09, 2023 9:04 pm

Multiple responses with scrollbar not starting from the top

Post by Nonungus »

Hello.

I've been trying to get this setup working using the Basic Standard Dialogue UI as reference (not modifying it directly). Response buttons are templates so they're auto-created and I got the scrollbar enabler working. Everything ok.

In this setup the responses build up from the bottom, so they're always attached to the dialogue box, but the "main" response is always on top of the list (Response 1). However, if the list is big enough to enable the scrollbar, it doesn't start from the top where Response 1 is.
dialoguesetup01.png
dialoguesetup01.png (36.28 KiB) Viewed 183 times
dialoguesetup02.png
dialoguesetup02.png (45.49 KiB) Viewed 183 times
Is there any way to make it work from the Dialogue System options or Unity UI components? Or does this need coding?

Thanks in advance! :)
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple responses with scrollbar not starting from the top

Post by Tony Li »

Hi,

Here's a patch for that:

DS_MenuScrollbarPatch_2023-02-10.unitypackage

Make sure your response menu panel's StandardUIMenuPanel component > OnContentChanged() event calls ScrollbarEnabler.CheckScrollbar.
Nonungus
Posts: 4
Joined: Thu Feb 09, 2023 9:04 pm

Re: Multiple responses with scrollbar not starting from the top

Post by Nonungus »

Works like a charm, thanks a lot! :)
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple responses with scrollbar not starting from the top

Post by Tony Li »

Glad to help!
Post Reply