Page 1 of 1

Journal UI Detail Scroll On Top

Posted: Tue Apr 13, 2021 7:32 pm
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;
    }
}

Re: Journal UI Detail Scroll On Top

Posted: Tue Apr 13, 2021 9:20 pm
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 513 times

Re: Journal UI Detail Scroll On Top

Posted: Wed Apr 14, 2021 11:20 am
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

Re: Journal UI Detail Scroll On Top

Posted: Wed Apr 14, 2021 1:13 pm
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.