mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-29 06:35:28 +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;
|
this.searchPhrase = phrase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void partialReset() {
|
||||||
|
if (inventory != null)
|
||||||
|
inventory.clear();
|
||||||
|
|
||||||
|
setActionForRange(0, 44, null);
|
||||||
|
cellItems.clear();
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
public void draw() {
|
public void draw() {
|
||||||
try {
|
try {
|
||||||
reset();
|
partialReset();
|
||||||
|
drawVariableButtons();// remove from here
|
||||||
drawFixedButtons();
|
drawFixedButtons();
|
||||||
drawItems();
|
drawItems();
|
||||||
} catch (Exception e) {
|
} 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());
|
return this.items.stream().skip((page - 1) * 45L).limit(45L).collect(Collectors.toList());
|
||||||
}).asyncLast((data) -> {
|
}).asyncLast((data) -> {
|
||||||
pages = (int) Math.max(1, Math.ceil(this.items.size() / (double) 45L));
|
pages = (int) Math.max(1, Math.ceil(this.items.size() / (double) 45L));
|
||||||
drawVariableButtons();
|
// todo possibly re-add variable btns draw
|
||||||
drawPaginationButtons();
|
drawPaginationButtons();
|
||||||
placeItems(data);
|
placeItems(data);
|
||||||
}).execute();
|
}).execute();
|
||||||
|
Loading…
Reference in New Issue
Block a user