Journal UI Detail Scroll On Top

Announcements, support questions, and discussion for Quest Machine.
Post Reply
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Journal UI Detail Scroll On Top

Post by mac »

Hey Tony, when I open a quest/ expand on the Journal to see its details for the first time, the details scroll starts at the top like it should, but if I close the Journal UI and reopen it, the details scroll rect will jump to its bottom, how can I make sure it reopens in the top?

I tried calling this code on journal OnOpen() but it still behaves the same way, I guess something overrides the code?

Code: Select all

{
    Scrollbar scrollBar;

    void Awake()
    {
        scrollBar = this.gameObject.GetComponent<Scrollbar>();
    }

    public void ScrollTop()
    {
        scrollBar.value = 1;
    }
}
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Journal UI Detail Scroll On Top

Post by Tony Li »

Hi,

Try assigning the Quest Details Panel to the main Quest Journal UI GameObject's UI Panel > OnOpen() event. Configure it to call UIScrollbarEnabler.CheckScrollbarWithResetValue = 1:

questDetailsScroll.png
questDetailsScroll.png (77.88 KiB) Viewed 507 times
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Journal UI Detail Scroll On Top

Post by mac »

Hello Tony, tried that, also with 0 and 0.5 values, the result is always the same, the details jumps to the bottom after reopening the Journal
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Journal UI Detail Scroll On Top

Post by Tony Li »

Hi,

Would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com? I'm not sure how to reproduce the issue.
Post Reply