add setter for gui page count

This commit is contained in:
jascotty2 2019-09-30 18:33:45 -05:00
parent 6e20629f03
commit a305dfa014

View File

@ -635,6 +635,13 @@ public class Gui {
return this;
}
public void setPages(int pages) {
this.pages = Math.max(1, pages);
if (page > pages) {
setPage(pages);
}
}
public void setPage(int page) {
int lastPage = this.page;
this.page = Math.max(1, Math.min(pages, page));