mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-27 12:35:12 +01:00
add setter for gui page count
This commit is contained in:
parent
6e20629f03
commit
a305dfa014
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user