aboutsummaryrefslogtreecommitdiff
path: root/main/java/gregtech/api/gui
diff options
context:
space:
mode:
Diffstat (limited to 'main/java/gregtech/api/gui')
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java b/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java
index a06151b5cd..7898f3b635 100644
--- a/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java
+++ b/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java
@@ -1,6 +1,10 @@
package gregtech.api.gui;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
+
+import java.util.ArrayList;
+import java.util.List;
+
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.InventoryPlayer;
@@ -31,6 +35,25 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
fontRendererObj.drawString(mName, 8, 4, 4210752);
+ drawTooltip(par1, par2);
+ }
+
+ private void drawTooltip(int x2, int y2){
+ int xStart = (width - xSize) / 2;
+ int yStart = (height - ySize) / 2;
+ int x = x2 - xStart;
+ int y = y2 - yStart +5;
+ List<String> list = new ArrayList<String>();
+ if (y >= 67 && y <= 84) {
+ if (x >= 7 && x <= 24){
+ list.add("Fluid Auto-Output");
+ }
+ if (x >= 25 && x <= 42){
+ list.add("Item Auto-Output");
+ }
+ }
+ if (!list.isEmpty())
+ drawHoveringText(list, x, y, fontRendererObj);
}
@Override