aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-09-11 13:47:51 +0200
committerLorenz <lo.scherf@gmail.com>2022-09-11 13:47:51 +0200
commit19aceb0ba5456d63660326b4cc630c9c9a240415 (patch)
treebc13f20a9bb16b9c13606b3f0507bad7d9d4c211 /src/main/java
parenta5692f1aa2fd445056cc463e1316ef79d9f269a6 (diff)
downloadNotEnoughUpdates-19aceb0ba5456d63660326b4cc630c9c9a240415.tar.gz
NotEnoughUpdates-19aceb0ba5456d63660326b4cc630c9c9a240415.tar.bz2
NotEnoughUpdates-19aceb0ba5456d63660326b4cc630c9c9a240415.zip
renamed filterEnabled
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java3
2 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java
index afefd1b2..38f1c9e1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java
@@ -63,7 +63,7 @@ public class MinionHelperOverlay {
private LinkedHashMap<String, OverviewLine> cacheRenderMap = null;
private int cacheTotalPages = -1;
- private boolean showOnlyAvailable = true;
+ private boolean filterEnabled = true;
private int maxPerPage = 8;
private int currentPage = 0;
@@ -198,7 +198,7 @@ public class MinionHelperOverlay {
Map<Minion, Double> prices = new HashMap<>();
for (Minion minion : manager.getAllMinions().values()) {
- if (!minion.doesMeetRequirements() && showOnlyAvailable) continue;
+ if (!minion.doesMeetRequirements() && filterEnabled) continue;
if (!minion.isCrafted()) {
double price = manager.getPriceCalculation().calculateUpgradeCosts(minion, true);
prices.put(minion, price);
@@ -218,7 +218,7 @@ public class MinionHelperOverlay {
GL11.glColor4f(1, 1, 1, 1);
GlStateManager.disableLighting();
Utils.drawTexturedRect(guiLeft + xSize + 4, guiTop, 168, 128, 0, 1f, 0, 1f, GL11.GL_NEAREST);
- if (showOnlyAvailable) {
+ if (filterEnabled) {
minecraft.getTextureManager().bindTexture(greenCheckImage);
} else {
minecraft.getTextureManager().bindTexture(whiteCheckImage);
@@ -292,7 +292,7 @@ public class MinionHelperOverlay {
}
private void addTitle(Map<Minion, Double> prices, LinkedHashMap<String, OverviewLine> renderMap) {
- String name = "§8" + prices.size() + " " + (showOnlyAvailable ? "craftable" : "total") + " minions";
+ String name = "§8" + prices.size() + " " + (filterEnabled ? "craftable" : "total") + " minions";
renderMap.put(name, new OverviewText(Collections.emptyList(), () -> {}));
}
@@ -339,7 +339,7 @@ public class MinionHelperOverlay {
}
private void toggleShowAvailable() {
- showOnlyAvailable = !showOnlyAvailable;
+ filterEnabled = !filterEnabled;
currentPage = 0;
resetCache();
}
@@ -383,7 +383,7 @@ public class MinionHelperOverlay {
public void onProfileSwitch() {
currentPage = 0;
- showOnlyAvailable = true;
+ filterEnabled = true;
}
public void setMaxPerPage(int maxPerPage) {
@@ -394,7 +394,7 @@ public class MinionHelperOverlay {
this.topLeft = topLeft;
}
- public boolean isShowOnlyAvailable() {
- return showOnlyAvailable;
+ public boolean isFilterEnabled() {
+ return filterEnabled;
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
index dce9f7a9..3de67f4d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
@@ -93,11 +93,10 @@ public class MinionHelperOverlayHover {
final int scaledHeight = scaledresolution.getScaledHeight();
int mouseX = Mouse.getX() * scaledWidth / Minecraft.getMinecraft().displayWidth;
int mouseY = scaledHeight - Mouse.getY() * scaledHeight / Minecraft.getMinecraft().displayHeight - 1;
- boolean showOnlyAvailable = overlay.isShowOnlyAvailable();
List<String> list = new ArrayList<>();
- if (showOnlyAvailable) {
+ if (overlay.isFilterEnabled()) {
list.add("§aFilter enabled!");
list.add("§7Only show minions that can be");
list.add("§7crafted and meet requirements.");