aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-01-02 14:31:16 +0800
committershedaniel <daniel@shedaniel.me>2020-01-02 14:31:16 +0800
commit5e2eccadbd91171c01cdb209d1338bcfb7786b1c (patch)
tree6c7387de5baea8b335e8abe58651018f77ad2d41 /src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
parente8714fe8fc1dcaec7ad299c63e2b657870c8fb40 (diff)
downloadRoughlyEnoughItems-5e2eccadbd91171c01cdb209d1338bcfb7786b1c.tar.gz
RoughlyEnoughItems-5e2eccadbd91171c01cdb209d1338bcfb7786b1c.tar.bz2
RoughlyEnoughItems-5e2eccadbd91171c01cdb209d1338bcfb7786b1c.zip
3.3
Fix #58 Close #134 Close #158 Fix #227
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
index 0872d55a8..7623a20a6 100644
--- a/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
+++ b/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
@@ -17,22 +17,22 @@ import java.util.Collections;
import java.util.List;
public class TabWidget extends WidgetWithBounds {
-
+
public static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png");
public static final Identifier CHEST_GUI_TEXTURE_DARK = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer_dark.png");
-
+
public boolean shown = false, selected = false;
public EntryStack logo;
public int id;
public String categoryName;
public Rectangle bounds;
public RecipeCategory category;
-
+
public TabWidget(int id, Rectangle bounds) {
this.id = id;
this.bounds = bounds;
}
-
+
public void setRenderer(RecipeCategory category, EntryStack logo, String categoryName, boolean selected) {
if (logo == null) {
shown = false;
@@ -45,24 +45,24 @@ public class TabWidget extends WidgetWithBounds {
this.selected = selected;
this.categoryName = categoryName;
}
-
+
public boolean isSelected() {
return selected;
}
-
+
public int getId() {
return id;
}
-
+
public boolean isShown() {
return shown;
}
-
+
@Override
public List<Widget> children() {
return Collections.emptyList();
}
-
+
@Override
public void render(int mouseX, int mouseY, float delta) {
if (shown) {
@@ -75,7 +75,7 @@ public class TabWidget extends WidgetWithBounds {
}
}
}
-
+
@SuppressWarnings("deprecation")
private void drawTooltip() {
if (this.minecraft.options.advancedItemTooltips)
@@ -83,10 +83,10 @@ public class TabWidget extends WidgetWithBounds {
else
ScreenHelper.getLastOverlay().addTooltip(QueuedTooltip.create(categoryName, ClientHelper.getInstance().getFormattedModFromIdentifier(category.getIdentifier())));
}
-
+
@Override
public Rectangle getBounds() {
return bounds;
}
-
+
}