aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-01-03 23:20:31 +0800
committershedaniel <daniel@shedaniel.me>2020-01-03 23:20:31 +0800
commit2077ebf086543587c4fc7ca9b125809609f749b9 (patch)
tree2d8bbbb075809c4dac0a701de238dfaf4d6b092a /src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java
parent3e5c16747b3403cc4cc725676c13ba50f04d3e9b (diff)
downloadRoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.tar.gz
RoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.tar.bz2
RoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.zip
Compact the design and add cooking xp details
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java b/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java
index 046412e26..7e51678b2 100644
--- a/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java
+++ b/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java
@@ -288,7 +288,8 @@ public class ContainerScreenOverlay extends WidgetWithBounds {
widgets.add(new ClickableLabelWidget(new Point(rectangle.x + (rectangle.width / 2), rectangle.y + (ConfigObject.getInstance().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + 10), "") {
@Override
public void render(int mouseX, int mouseY, float delta) {
- setText(String.format("%s/%s", ENTRY_LIST_WIDGET.getPage() + 1, ENTRY_LIST_WIDGET.getTotalPages()));
+ clickable(ENTRY_LIST_WIDGET.getTotalPages() > 1);
+ setText(String.format("%s/%s", ENTRY_LIST_WIDGET.getPage() + 1, Math.max(ENTRY_LIST_WIDGET.getTotalPages(), 1)));
super.render(mouseX, mouseY, delta);
}
@@ -308,8 +309,7 @@ public class ContainerScreenOverlay extends WidgetWithBounds {
public boolean changeFocus(boolean boolean_1) {
return false;
}
- }.clickable(ENTRY_LIST_WIDGET.getTotalPages() != 1));
- buttonLeft.enabled = buttonRight.enabled = ENTRY_LIST_WIDGET.getTotalPages() != 1;
+ });
}
if (ConfigObject.getInstance().isCraftableFilterEnabled())
this.widgets.add(toggleButtonWidget = new CraftableToggleButtonWidget(getCraftableToggleArea()) {
@@ -508,7 +508,7 @@ public class ContainerScreenOverlay extends WidgetWithBounds {
if (!ScreenHelper.isOverlayVisible())
return;
if (!ConfigObject.getInstance().isEntryListWidgetScrolled())
- buttonLeft.enabled = buttonRight.enabled = ENTRY_LIST_WIDGET.getTotalPages() != 1;
+ buttonLeft.enabled = buttonRight.enabled = ENTRY_LIST_WIDGET.getTotalPages() > 1;
for (Widget widget : widgets) {
widget.render(int_1, int_2, float_1);
}