mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +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);
|
||||
screen.addPageButtons(187, 30, 350, incr -> {
|
||||
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