mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-25 05:55:13 +01:00
🔁 do partial resets in main gui, only draw variable buttons on full draw() call
Took 4 minutes
This commit is contained in:
parent
35ab8d2339
commit
1970f5c3e9
@ -113,9 +113,19 @@ public class GUIAuctionHouse extends AbstractPlaceholderGui {
|
||||
this.searchPhrase = phrase;
|
||||
}
|
||||
|
||||
private void partialReset() {
|
||||
if (inventory != null)
|
||||
inventory.clear();
|
||||
|
||||
setActionForRange(0, 44, null);
|
||||
cellItems.clear();
|
||||
update();
|
||||
}
|
||||
|
||||
public void draw() {
|
||||
try {
|
||||
reset();
|
||||
partialReset();
|
||||
drawVariableButtons();// remove from here
|
||||
drawFixedButtons();
|
||||
drawItems();
|
||||
} catch (Exception e) {
|
||||
@ -175,7 +185,7 @@ public class GUIAuctionHouse extends AbstractPlaceholderGui {
|
||||
return this.items.stream().skip((page - 1) * 45L).limit(45L).collect(Collectors.toList());
|
||||
}).asyncLast((data) -> {
|
||||
pages = (int) Math.max(1, Math.ceil(this.items.size() / (double) 45L));
|
||||
drawVariableButtons();
|
||||
// todo possibly re-add variable btns draw
|
||||
drawPaginationButtons();
|
||||
placeItems(data);
|
||||
}).execute();
|
||||
|
Loading…
Reference in New Issue
Block a user