From 5e2eccadbd91171c01cdb209d1338bcfb7786b1c Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 2 Jan 2020 14:31:16 +0800 Subject: 3.3 Fix #58 Close #134 Close #158 Fix #227 --- .../me/shedaniel/rei/gui/widget/TabWidget.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java') 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 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; } - + } -- cgit