Updated scroll bar

Changes scroll bar to act like a real scroll bar
This commit is contained in:
RedstonewolfX 2024-08-17 17:23:43 -04:00
parent 8608a5bfdc
commit 4665d710d1
2 changed files with 3 additions and 3 deletions

View File

@ -29,8 +29,8 @@ export class ScrollBar extends Phaser.GameObjects.Container {
setPages(pages: number): void {
this.pages = pages;
this.handleBody.height = (this.bg.displayHeight - 1 - this.handleBottom.displayHeight) / this.pages;
this.handleBody.height = (this.bg.displayHeight - 1 - this.handleBottom.displayHeight) * 9 / this.pages;
this.setVisible(this.pages > 1);
this.setVisible(this.pages > 9);
}
}

View File

@ -2416,7 +2416,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
}
});
this.starterSelectScrollBar.setPages(Math.ceil((this.filteredStarterContainers.length - 81) / 9) + 1);
this.starterSelectScrollBar.setPages(Math.ceil(this.filteredStarterContainers.length / 9));
this.starterSelectScrollBar.setPage(0);
// sort