mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Reset the scrollbars when moving between dex pages
This commit is contained in:
parent
06268b70ca
commit
bfe5f2e3b9
1 changed files with 2 additions and 0 deletions
|
@ -47,6 +47,8 @@ public class SpellbookTraitDexPageContent extends DrawableHelper implements Spel
|
||||||
rightPage.init(screen, page + 1);
|
rightPage.init(screen, page + 1);
|
||||||
screen.addPageButtons(187, 30, 350, incr -> {
|
screen.addPageButtons(187, 30, 350, incr -> {
|
||||||
offset = MathHelper.clamp(offset + incr, 0, (int)Math.ceil(traits.length / 2F) - 1);
|
offset = MathHelper.clamp(offset + incr, 0, (int)Math.ceil(traits.length / 2F) - 1);
|
||||||
|
leftPage.scrollbar.scrollBy(leftPage.scrollbar.getVerticalScrollAmount());
|
||||||
|
rightPage.scrollbar.scrollBy(rightPage.scrollbar.getVerticalScrollAmount());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue